[llvm-commits] calling convention support for ARM AAPCS VFP "homogenous aggregates"

Sandeep Patel deeppatel1987 at gmail.com
Fri Aug 14 02:06:01 PDT 2009


Attached are split versions of this patch as requested, with minor
updates for the latest LLVM API changes applied.

1. deep-gcc-hard-float-varargs.diff applies the AAPCS base standard
CallingConv for varargs functions, as per the spec.
2. deep-gcc-callingconv-id.diff is item 1 below, changing remaining
uses of a CallingConv from unsigned to CallingConv::ID. The additional
header inclusion is very minimal, only in llvm-internal.h.
3. deep-gcc-calling-conv-mixed.diff is items 2 and 3 below, tracking
the CC in all DefaultABIClient subclasses and flowing it into
LLVM_SHOULD_PASS_AGGREGATE_IN_MIXED_REGS and
LLVM_AGGREGATE_PARTIALLY_PASSED_IN_REGS. This adds an include of
CallingConv.h in llvm-abi.h, which is already includes
llvm-internal.h.
4. deep-gcc-homogeneous.diff is item 4 below, adding the use of this
stuff in the ARM backend as per the AAPCS VFP spec.

deep

On Fri, Aug 14, 2009 at 5:27 AM, Bob Wilson<bob.wilson at apple.com> wrote:
> Sandeep,
>
> This looks pretty good to me.  I have some minor comments that I will try to
> collect in the next day or two.  I think you should split this up a bit,
> though.  Having seen the motivation for making the CC available in more
> contexts, it would be good to submit that as a separate patch.  I.E., one
> patch for parts 2 and 3 from your list.
>
> The change to use CallingConv::ID should be reviewed by someone more
> familiar with llvm-gcc.  It looks to me like someone intentionally decided
> to use "unsigned" to avoid pulling in the header file for CallingConv::ID,
> and now you're changing that decision.
>
> On Aug 5, 2009, at 3:15 AM, Sandeep Patel wrote:
>
>> Attached is a patch to llvm-gcc to implement passing of homogenous
>> aggregates via FP registers per the ARM AAPCS VFP variant (a.k.a. hard
>> float).
>>
>> 1. The patch uses CallingConv::ID consistently instead of unsigned to
>> hold the CC.
>> 2. The patch keeps track of the CC in all DefaultABIClient subclasses.
>> 3. The patch passes the CC into
>> LLVM_SHOULD_PASS_AGGREGATE_IN_MIXED_REGS and
>> LLVM_AGGREGATE_PARTIALLY_PASSED_IN_REGS.
>> 4. The patch implements both macros in the ARM backend according to
>> the rules of the AAPCS spec.
>>
>> Note: no code was imported to implement this. The structure of
>> vfp_arg_homogenous_aggregate_p was originally taken from the i386
>> classify_argument() function.
>>
>> deep
>>
>> <deep-gcc-hard-float-homogeneous.diff>_______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deep-gcc-hard-float-varargs.diff
Type: application/octet-stream
Size: 702 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090814/4f9dd53f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deep-gcc-callingconv-id.diff
Type: application/octet-stream
Size: 4825 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090814/4f9dd53f/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deep-gcc-calling-conv-mixed.diff
Type: application/octet-stream
Size: 9053 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090814/4f9dd53f/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deep-gcc-homogeneous.diff
Type: application/octet-stream
Size: 14570 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090814/4f9dd53f/attachment-0003.obj>


More information about the llvm-commits mailing list