September 2017
Beginner to intermediate
290 pages
6h 58m
English
The AMD64 calling convention is used on 64-bit Unix-like systems by default. The idea is very similar except that a different set of registers is used and there is no shadow space requirement. Another difference is that the AMD64 calling convention allows up to 6 integer parameters and up to 8 floating point values to be passed via registers:
|
Parameter index
(zero based)
|
Integer/pointer
|
Floating point
|
|
0
|
RDI
|
XMM0
|
|
1
|
RSI
|
XMM1
|
|
2
|
RDX
|
XMM2
|
|
3
|
RCX
|
XMM3
|
|
4
|
R8
|
XMM4
|
|
5
|
R9
|
XMM5
|
|
6
|
on stack
|
XMM6
|
|
7
|
on stack
|
XMM7
|
The following macro instruction is a primitive implementation of such a mechanism. Just as in the case of the Microsoft x64 example, this one does not handle ...
Read now
Unlock full access