Compiler Recommendations

Kristian Erik Hermansen kristian.hermansen at gmail.com
Fri Jan 4 07:49:16 EST 2008


On Jan 4, 2008 4:40 AM, Jerry Feldman <gaf at blu.org> wrote:
> Additionally, most modern compilers (at least on hardware like RISC with
> a lot of registers) pass some of the parameters to a function in
> registers. Usually the chip vendor or the OS vendor specify this. On
> the Alpha chip, the first 6 parameters were always passed in registers,
> with the exception of structs. It would get interesting if an int or
> long was passed into a function that expected a double. That value
> would be placed into the appropriate integer register, but the function
> would grab the double out of a floating point register. This is easy to
> do on code that does not use function prototypes.

SPARC also passes first six args via registers.  iirc, i0 through i5...
-- 
Kristian Erik Hermansen
"Know something about everything and everything about something."

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Discuss mailing list