[cfe-commits] [PATCH] Properly factor Native Client defines to support NaCl as an OS with x86/ARM architecture

Derek Schuff dschuff at google.com
Tue Oct 9 14:49:08 PDT 2012


+rjmccall, especially for ABIInfo stuff

>>> On Thu, Sep 27, 2012 at 11:24 AM, Derek Schuff <dschuff at google.com> wrote:
>>>> Hi,
>>>> This patch refactors the NaCl/PNaCl support in clang such that the
>>>> defines which belong to the NaCl OS (e.g. __native_client__) come from
>>>> an OSTargetInfo and only those which are for Portable NaCl ( __pnacl__
>>>> and __le32__) come from the PNaClTargetInfo.
>>>> It thus allows the compiler to support e.g. x86_64-nacl and arm-nacl
>>>> targets (as well as le32-nacl). It would be a very small change except
>>>> that the x86_64 nacl ABI is X32-like with 32-bit pointers, and does
>>>> not use 80-bit float types. So, some small changes to e.g.
>>>> X86_64ABIInfo.
>>>>
>>>> This patch is split into 2 parts. The first is a change to
>>>> X86_64ABIInfo to support x86-64 targets with 32 bit pointers. The
>>>> approach is similar to the change proposed by the X32 team[1]
>>>> (although it is slightly more general in its naming scheme and does
>>>> not have X32-specific bits).
>>>>
>>>> The second change actually makes the NaCl specific changes. There is
>>>> one small intrusion into X86_64ABIInfo::classify to disable the 80-bit
>>>> FP types (suggestions on that are welcome)
>>>>
>>>> Patches are attached or may be viewed at
>>>> http://codereview.chromium.org/10982073 and
>>>> http://codereview.chromium.org/10986071
>>>>
>>>> Please take a look, thanks.
>>>> -Derek



More information about the cfe-commits mailing list