Wilco Dijkstra <wilco.dijks...@arm.com> writes: > Hi Richard, > >> I think this should be in a push_options/pop_options block, as for other >> intrinsics that require certain features. > > But then the intrinsic would always be defined, which is contrary to what the > ACLE spec demands - it would not give a compilation error at the callsite > but give assembler errors (potentially in different functions after inlining).
Inlining will fail with an error if the callsite doesn't have the right features. E.g.: https://godbolt.org/z/7zz59PhTE The error message isn't great, but it is at least an error. :) >> What was the reason for using an inline asm rather than a builtin? >> Feels a bit old school. :) Using a builtin should mean that the >> RTL optimisers see the extent of the write. > > Given this intrinsic will be used very rarely, if ever, it does not make sense > to provide anything more than the basic functionality. But a lot of effort went into making the old inline asm ACLE implementations use builtins instead. It even seems to have been a complete transition. (Although we still have: /* Start of temporary inline asm implementations. */ ... /* End of temporary inline asm. */ heh.) So this feels like a regression in terms of implementation methodology. I won't object if another maintainer approves the function in this form, but I'd only be comfortable approving a builtin version. Thanks, Richard