x86-64 calling convention by gcc

What is the x86-64 calling convention by gcc?
asked Jan 21, 2013 by anonymous

1 Answer

 
Best answer

The calling convention of the System V AMD64 ABI is followed on GNU/Linux. The registers RDI, RSI, RDX, RCX, R8, and R9 are used for integer and memory address arguments and XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6 and XMM7 are used for floating point arguments.

For system calls, R10 is used instead of RCX. Additional arguments are passed on the stack and the return value is stored in RAX.

Michael Matz, Jan Hubicka, Andreas Jaeger, and Mark Mitchell. System V Application Binary Interface AMD64 Architecture Processor Supplement. 0.99.6: http://x86-64.org/documentation/abi.pdf

x86 calling convention from Wikipedia: http://en.wikipedia.org/wiki/X86_calling_conventions#cite_note-AMD-9

answered Jan 21, 2013 by anonymous

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...