[LLVMdev] ARM eabi calling convention

Sandeep Patel deeppatel1987 at gmail.com
Tue Aug 7 10:34:48 PDT 2012


On Tue, Aug 7, 2012 at 10:59 AM, Anton Korobeynikov
<anton at korobeynikov.info> wrote:
>>> See ARMCallingConv.td:113. The alignment of the arg is checked and if
>>> it's 8-byte aligned, the proper registers are chosen.
>>
>> Are you sure?  In this case, it looks like the frontend is translating the argument type to [2 x i32], so it's not going to have 8-byte alignment.  This looks like a bug to me (but I haven't actually tried it).
> It seems this will work for double's only when passing inside GP regs,
> but not for anything else...

Which is how llvm-gcc lowered this. This is a clang bug.

> Probably all the "alignment" logic needs to be moved upper to frontend...

There have been several proposals to unify all this argument passing
logic, but most have focused on doing it later in the backend.

deep



More information about the llvm-dev mailing list