r206963 - [ARM64] Change inline assembly constraints to be more lax, to match the behaviour of Clang/AArch64 and GCC.

Eric Christopher echristo at gmail.com
Fri Apr 25 13:38:46 PDT 2014


On Thu, Apr 24, 2014 at 1:49 AM, Tim Northover <t.p.northover at gmail.com> wrote:
> On 24 April 2014 00:35, Jim Grosbach <grosbach at apple.com> wrote:
>> I share Eric’s concern here. As I recall, the spec from ARM was very clear on this point, requiring a modifier to specify anything other than a 64-bit GPR. Matching the behavior of GCC is not a sufficient reason to change that unless the specification changed as well.
>
> Unfortunately, that spec doesn't seem to have made it to GCC, either
> in code or in documentation form.

Yeah, no kidding.

>
> Personally, I don't think GPR64 has any more claim to being general
> purpose than GPR32. The options I'd favour are to *require* an operand
> modifier in all cases (I'm always in favour of explicit assembly), or
> what GCC actually does by inferring the size. The first is clearly not
> viable though.
>

Well, it is a 64-bit architecture by default.

The major reason I disagree with the change is that the code had in
the past and continues to find bugs in inline assembly. As far as the
"compatible with gcc" argument: you can make a similar change there to
make it more strict :p

-eric




More information about the cfe-commits mailing list