Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compilers > Re: x86-64 and ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 15 of 17 Topic 2419 of 2529
Post > Topic >>

Re: x86-64 and calling conventions

by glen herrmannsfeldt <gah@[EMAIL PROTECTED] > May 29, 2008 at 01:56 PM

Boleslaw Ciesielski wrote:
(I wrote)

>>As far as passing arguments in registers, there is at least one
>>convention (possibly SPARC, but I am not sure now) where some are
>>passed in registers, but stack space is still reserved for them.  The
>>called routine can then store them into the stack.  As some number of
>>words are kept in the registers, in some cases a double variable will
>>be half in a register and half on the stack.  Storing to the stack is
>>a convenient way to get the two back together again.

> This is the case for 32-bit PowerPC.

It seems the one I was remembering is SPARC.  The LCC book, "A
Retargetable C compiler: Design and Implementation," describes code
generators for MIPS R3000, SPARC, and x86.

For SPARC, the first 24 bytes of arguments go in registers, even if a
double is split in half.  Stack space is allocated for them, and also
16 words to store other registers if the register stack overflows.
Floating point values are passed in i registers, so have to be stored
anyway before they can be loaded into floating point registers.  It
would have seemed more convenient to pass floating point values in
floating point registers, but that may not be compatible with C,
especially in the case of varargs.

-- glen
 




 17 Posts in Topic:
x86-64 and calling conventions
"cr88192" <c  2008-05-12 09:44:42 
Re: x86-64 and calling conventions
"cr88192" <c  2008-05-12 20:10:59 
Re: x86-64 and calling conventions
Bart <bc@[EMAIL PROTEC  2008-05-14 19:22:59 
Re: x86-64 and calling conventions
"cr88192" <c  2008-05-15 15:44:11 
Re: x86-64 and calling conventions
James Harris <james.ha  2008-05-12 04:12:03 
Re: x86-64 and calling conventions
James Harris <james.ha  2008-05-14 03:38:42 
Re: x86-64 and calling conventions
James Harris <james.ha  2008-05-14 11:37:05 
Re: x86-64 and calling conventions
Vidar Hokstad <vidar.h  2008-05-12 05:48:02 
Re: x86-64 and calling conventions
"cr88192" <c  2008-05-13 18:19:29 
Re: x86-64 and calling conventions
Dave Parker <daveparke  2008-05-12 20:10:58 
Re: x86-64 and calling conventions
"cr88192" <c  2008-05-13 17:51:07 
Re: x86-64 and calling conventions
glen herrmannsfeldt <g  2008-05-13 01:28:57 
Re: x86-64 and calling conventions
"cr88192" <c  2008-05-15 07:44:35 
Re: x86-64 and calling conventions
Boleslaw Ciesielski <b  2008-05-23 12:05:14 
Re: x86-64 and calling conventions
glen herrmannsfeldt <g  2008-05-29 13:56:05 
Re: x86-64 and calling conventions
Vidar Hokstad <vidar.h  2008-05-14 08:20:27 
Re: x86-64 and calling conventions
"cr88192" <c  2008-05-15 06:46:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 4:44:18 CDT 2008.