This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: modified x86 ABI


Andreas Jaeger wrote:
One interesting question to me is what is the ABI like compared to the
x86-64 ABI? Did you just change the size of the types or did you change
others as well, e.g. calling conventions?

The ABI we used is based on the standard x86-64 ABI. The ILP32 objects adopt the following conventions:

- 16-byte alignment of the stack pointer upon calls.
- Arguments <= 32 bits wide for a call are padded to 32 bits and then
  aligned on 32-bit boundaries on the stack.  Any padding is above the
  argument.
- 64-bit arguments are aligned on 64-bit boundaries -- which may mean
  that padding is inserted beneath them (for example if there is a
  32-bit argument aligned to a 64-bit boundary beneath the 64-bit
  argument).  No more padding than is required is inserted.
- 128-bit arguments are aligned on a 128-bit boundary.

In all other respects the ABI follows the x86-64 one.  The ILP32 objects
are ELF64.

Do you need new binutils for this? A new C library?

Our binutils changes were minor, and a new C library will be required.


Mark


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]