~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to erts/emulator/hipe/hipe_x86_abi.txt

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090215164252-q5x4rcf8a5pbesb1
Tags: 1:12.b.5-dfsg-2
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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)
 
69
 
 
70
Windows 32-bit C Calling Conventions
 
71
====================================
 
72
See "Description of the calling conventions that the 32-bit
 
73
compiler supports" in msdn.
 
74
 
 
75
[the sets of caller-save and callee-save registers are not yet known]
 
76
 
 
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.
 
81
 
 
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 "_".
 
88
 
 
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.
 
96
 
 
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.