gnu.gcc.help
[Top] [All Lists]

Re: Which x86 registers to save in C functions?

Subject: Re: Which x86 registers to save in C functions?
From: Oleksandr Gavenko
Date: Thu, 04 Sep 2008 20:18:47 +0300
Newsgroups: gnu.gcc.help


Paul Pluzhnikov writes:
You almost certainly do not use 'one build' (as in, one set of
object files) for all of these platforms, because Windows uses
extended COFF, while Solaris and Linux use ELF object file format
(not sure what FreeBSD uses).

Yes, I wrong. objdump -p wrote "file format pe-i386" on Windows .obj files and "elf32-i386" on Linux .o files.

I also highlight incompatibility in name mangling: on Windows for cdecl calls funcs need decorate by underline, on Linux not needed.

On Mac OS X limited may be use same build as on Linux (there are some difference with System V ABI, for example differ conventions for use FPU/MMX register). For details may be refer to
http://gemma.apple.com/documentation/developertools/Conceptual/LowLevelABI/LowLevelABI.pdf

<Prev in Thread] Current Thread [Next in Thread>