|Procedure Calling Conventions firstname.lastname@example.org (Mr. Yogi) (1997-09-12)|
|Re: Procedure Calling Conventions email@example.com (1997-09-15)|
|Re: Procedure Calling Conventions firstname.lastname@example.org (Shankar Unni) (1997-09-23)|
|From:||email@example.com (Jacob Navia)|
|Date:||15 Sep 1997 21:29:43 -0400|
> 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
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
Jacob Navia Logiciels/Informatique
41 rue Maurice Ravel Tel (1) 126.96.36.199
93430 Villetaneuse Fax (1) 188.8.131.52
[Is this all written down anywhere? -John]
Return to the
Search the comp.compilers archives again.