Related articles |
---|
Procedure Calling Conventions yogi@cadence.com (Mr. Yogi) (1997-09-12) |
Re: Procedure Calling Conventions jacob@jacob.remcomp.fr (1997-09-15) |
Re: Procedure Calling Conventions shankar@powertelglobal.com (Shankar Unni) (1997-09-23) |
From: | jacob@jacob.remcomp.fr (Jacob Navia) |
Newsgroups: | comp.compilers |
Date: | 15 Sep 1997 21:29:43 -0400 |
Organization: | Compilers Central |
Keywords: | architecture, registers |
> please suggest me some reference/book on procedure calling conventions
> for intel's x86 family processors. I need to know the
> Caller-save/Callee-save partition of integer and FPU registers.
...
> [Interesting question, I don't have any references at hand. There are at
> least two popular x86 calling sequences, C (push args right to left and
> caller pops) and Pascal (push args left to right and callee pops), with
> mutants. At least they agree that floating registers are all caller saves
> and nobody seems to worry about FP stack overflow. -John]
There is increasingly popular _stdcall calling convention under
windows: It is like the C procedure call (push right to lefti), but
callee pops, and not the caller. This can be used only for functions
with a fixed number of arguments of course.
[That's the Pascal convention. -John]
Another convention is for floating point: results are returned at the
top of the FPU stack. 64 bit Integers are returned on EAX:EDX
register pair, with the low 32 bits of the result in EAX, high part in
EDX.
Saved registers:
The registers EBX ESI, EDI and EBP are always saved. All others are destroyed.
The FPU stack is volatile. No compiler/system saves the contents of the FPU
stack
--
Jacob Navia Logiciels/Informatique
41 rue Maurice Ravel Tel (1) 48.23.51.44
93430 Villetaneuse Fax (1) 48.23.95.39
France
[Is this all written down anywhere? -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.