[llvm-commits] [PATCH] x32 ABI support: 32-bit pointer size and handling sret

Eli Bendersky eliben at google.com
Fri Jan 25 14:10:41 PST 2013


On Fri, Jan 25, 2013 at 9:56 AM, Nadav Rotem <nrotem at apple.com> wrote:
> LGTM.

Thanks. Committed in r173503.

Eli


>
> On Jan 25, 2013, at 9:40 AM, Eli Bendersky <eliben at google.com> wrote:
>
>> Hello,
>>
>> This is the next patch in the effort to add x32 ABI support to LLVM
>> (introduced in http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-January/058209.html).
>>
>> In this patch, we teach X86_64TargetMachine that it has a ILP32
>> (defined by the x32 ABI) mode, in which case its pointers are 32-bits
>> in size. This knowledge is also added to X86RegisterInfo that now
>> returns the appropriate registers in getPointerRegClass.
>>
>> There are many outcomes to this change. In order to keep the patches
>> separate and manageable, we start by focusing on some simple testable
>> cases. The patch adds a test with passing a pointer to a function -
>> focusing on the difference between the two data models for x86-64.
>> Another test is added for handling of 'sret' arguments (and
>> functionality is added in X86ISelLowering to make it work).
>>
>> A note on naming: the "x32 ABI" document refers to the AMD64
>> architecture (in LLVM it's distinguished by being is64Bits() in the
>> x86 subtarget) with two variations: the LP64 (default) data model, and
>> the ILP32 data model. For lack of better ideas for naming, this patch
>> adds predicates to the subtarget which are consistent with this naming
>> scheme.
>>
>> This patch in particular, and our x32 effort in general, is partly
>> based on the x32 patches Michael Liao from Intel sent last year. Our
>> goal is to reconcile the ILP32 needs of Native Client with Michael's
>> x32 approach into generic patches that will be generally useful.
>>
>> Eli
>> <x32-pointer-size-sret.2.patch>_______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



More information about the llvm-commits mailing list