[PATCH] D44815: [AArch64]: Add support for parsing rN registers.

Tim Northover via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 27 06:16:37 PDT 2018


t.p.northover added a comment.

The warning you're seeing is because without an operand modifier Clang always chooses an x-register in its textual assembly expansion. This 64-bit default is compared to the underlying C type to determine whether a warning should be emitted, and I think that's reasonable. The C type is all that's available for most uses (without a `register` keyword) and it seems consistent to use it even when `register` has been specified on the variable.

Where we might want to introduce a new warning is for a mismatch like:

  register uint64_t var asm("w0"); // 64-bits in a 32-bit register. Magic!

But that seems pretty separate to this patch really.

But


Repository:
  rC Clang

https://reviews.llvm.org/D44815





More information about the cfe-commits mailing list