MacOSX gcc, NetBSD for PPC, and the Sys V ABI?

Kevin B. Hendricks khendricks@ivey.uwo.ca
Mon Dec 11 07:28:00 GMT 2000


Hi,

I have been helping with the openoffice port and while working with some people from Sun helping to port things to MacOSX we found a wierd difference between the way floating point parameters are passed under Mac OSX gcc versus PPC Linux.

Under Mac OSX gcc, floating point registers f1 through f13 are used to pass floating point parameters to functions.

Under PPC Linux gcc, only registers f1 to f8 are used to pass floating point parameters to functions (although registers f1-f13 are considered volatile and can change across function calls).

I checked the latest Sys V ABI and I think PPC Linux does things correctly?
(f1-f13 are volatile, but only f1-f8 are used for parameter passing)

Is this difference a mistake or a choice?

If a mistake, who is should change: PPC Linux or MacOSX?

If a choice, then what ABI does MacOSX really follow?

Also does NetBSD for powerpc follow the Sys V ABI or the Mac OSX way of doing things?  The reason I need to know this is to help some NetBSD ppc folks modify the PPC Linux kaffe sysdep invoke routine I wrote to work for them.

If anyone wants to verify this, you can simply disassemble any program that passes more than 8 floating point values to function.

Any help or guidance on this would be greatly appreciated.

Thanks,

Kevin



More information about the Gcc mailing list