66
66
%ebp is optional frame pointer or local variable
67
67
actual parameters are pushed right-to-left
68
68
caller deallocates parameters after return (addl $N,%esp)
70
Windows 32-bit C Calling Conventions
71
====================================
72
See "Description of the calling conventions that the 32-bit
73
compiler supports" in msdn.
75
[the sets of caller-save and callee-save registers are not yet known]
77
Windows supports 3 calling conventions on x86 that differ in
78
whether caller or callee pops off stacked parameters,
79
whether any parameters are passed in registers, and
80
how function names are mangled.
82
The _cdecl convention (default)
83
-------------------------------
84
No parameters are passed in registers.
85
Parameters are pushed right-to-left.
86
Caller deallocates parameters after return (addl $N, %esp).
87
A function name is prefixed by a "_".
89
The _stdcall convention
90
-----------------------
91
No parameters are passed in registers.
92
Parameters are pushed right-to-left.
93
Callee deallocates parameters during return (ret $N).
94
A function name is prefixed by a "_" and suffixed by "@" and the
95
number of bytes of stack space the parameters use in decimal.
97
The _fastcall convention
98
------------------------
99
The first two parameters are passed in %ecx and %edx.
100
Remaining parameters are pushed right-to-left.
101
Callee deallocates stacked parameters during return (ret $N).
102
A function name is prefixed by a "@" and suffixed by "@" and the
103
number of bytes of stack space the parameters use in decimal.