[cfe-dev] Is this a clang bug? (asm + register + aarch64)

Tim Northover via cfe-dev cfe-dev at lists.llvm.org
Mon Oct 3 21:39:32 PDT 2016


On 3 October 2016 at 20:29, Neon <admin at typoflash.com> wrote:
> x2 is automatically used as input for the asm block. Also as caller-saved
> argument register shouldn't it be "clobbered" anyway?

asm blocks don't behave like function calls, the default is that they
affect nothing. As far as Clang is concerned your asm block neither
uses nor clobbers x2 unless you say it does.

Tim.



More information about the cfe-dev mailing list