GCC 64 bit Calling Conventions
Posted: Wed Nov 07, 2007 4:54 am
Ok - after some serious banging my head against a brick wall, I have found that 64 bit mode, GCC does not, in fact, push its arguments to the stack, but uses rdi to hold the first parameter.
After some Googling, I have found that GCC does use more of a fastcall-type system in 64 bit mode, but I haven't found a decent reference to the specifics of the system it does use. As I am about to write some asm support functions, this information would obviously be useful! I havent even found what I want on the GNU site - this may be my useless search terms, though .
Does anyone know of a good online reference to the calling system GCC uses when I am compiling for long mode?
Cheers,
Adam
After some Googling, I have found that GCC does use more of a fastcall-type system in 64 bit mode, but I haven't found a decent reference to the specifics of the system it does use. As I am about to write some asm support functions, this information would obviously be useful! I havent even found what I want on the GNU site - this may be my useless search terms, though .
Does anyone know of a good online reference to the calling system GCC uses when I am compiling for long mode?
Cheers,
Adam