[cfe-dev] ILP32, -arch i386 and x86_64 Apple systems

Jeffrey Walton via cfe-dev cfe-dev at lists.llvm.org
Tue Dec 1 10:36:03 PST 2015


On Tue, Dec 1, 2015 at 1:31 PM, David Chisnall
<David.Chisnall at cl.cam.ac.uk> wrote:
> On 1 Dec 2015, at 18:16, Jeffrey Walton via cfe-dev <cfe-dev at lists.llvm.org> wrote:
>>
>> My first question is, is _ILP32_ and _i386_ supposed to be defined
>> together? According to the docs I found, its not an expected/valid
>> configuration. _ILP32_ and _x86_64_ is an expected/valid
>> configuration.
>
> I’m not sure why you would expect otherwise.

Because of the documents covering the topic. They are cited at the
tail of the post.

> ... If you are using ILP32 to mean x32, then this sounds like a bug in your code.

OK, thanks.

When the i386 code is run on an x86_64 system (i.e., "arch i386
myprog.exe"), then we must interact with the stack using 64-bit values
and registers. Its an ABI requirement.

How can we do it if Clang's integrate assembler won't allow us to use
64-bit registers?

Jeff


More information about the cfe-dev mailing list