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

David Chisnall via cfe-dev cfe-dev at lists.llvm.org
Tue Dec 1 10:47:18 PST 2015


On 1 Dec 2015, at 18:36, Jeffrey Walton <noloader at gmail.com> wrote:
> 
> 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.

When i386 code is run on an x86-64 system, it is using a different system call layer, but is otherwise a normal 386 extended mode environment.  Without an explicit switch to long mode, it can not use any of the long mode registers.  There is most definitely not an ABI requirement that i386 code use non-i386 instructions.

David




More information about the cfe-dev mailing list