mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-07-24 10:25:42 -04:00
Give an example on how Unix and Win64 count argument differently
This commit is contained in:
parent
52b4d6d7b0
commit
3e30d5aefe
@ -6456,6 +6456,12 @@ All SSE and x87 registers are destroyed by function calls.
|
||||
|
||||
On 64-bit Unix, \c{long} is 64 bits.
|
||||
|
||||
Integer and SSE register arguments are counted separately, so for the case of
|
||||
|
||||
\c void foo(long a, double b, int c)
|
||||
|
||||
\c{a} is passed in \c{RDI}, \c{b} in \c{XMM0}, and \c{c} in \c{ESI}.
|
||||
|
||||
\H{win64} Interfacing to 64-bit C Programs (Win64)
|
||||
|
||||
The Win64 ABI is described at:
|
||||
@ -6478,6 +6484,12 @@ return is \c{XMM0} only.
|
||||
|
||||
On Win64, \c{long} is 32 bits; \c{long long} or \c{_int64} is 64 bits.
|
||||
|
||||
Integer and SSE register arguments are counted together, so for the case of
|
||||
|
||||
\c void foo(long long a, double b, int c)
|
||||
|
||||
\c{a} is passed in \c{RCX}, \c{b} in \c{XMM1}, and \c{c} in \c{R8D}.
|
||||
|
||||
\C{trouble} Troubleshooting
|
||||
|
||||
This chapter describes some of the common problems that users have
|
||||
|
Loading…
x
Reference in New Issue
Block a user