blob: a7a154c355573b1cfd9cafc25c8bc714cf1295c2 [file] [log] [blame]
sewardjbecae082006-01-12 12:20:48 +00001
2This file records register use conventions and info for the 4
3supported platforms (since it is ABI dependent). This is so as to
4avoid having to endlessly re-look up this info in ABI documents.
5
6 -----------------------
7
8x86-linux
9~~~~~~~~~
10
11Reg Callee Arg
12Name Saves? Reg? Comment Vex-uses?
13--------------------------------------------------------------
14eax n n int[31:0] retreg y
15ebx y n y
16ecx n n y
17edx n n int[63:32] retreg y
18esi y n y
19edi y n y
20ebp y n & guest state
21esp reserved n/a n/a
22eflags n n/a y
23st0 n ? n fp retreg y
24st1-7 n ? n y
25xmm0-7 n ? n y
26
27
28amd64-linux
29~~~~~~~~~~~
30
31Reg Callee Arg
32Name Saves? Reg? Comment Vex-uses?
33-------------------------------------------------------------------
34rax n n int[63:0] retreg y
35rbx y n y
36rcx n int#4 y
37rdx n int#3 int[127:64] retreg y
38rsi n int#2 y
39rdi n int#1 y
40rbp y n & guest state
41rsp reserved n/a n/a
42r8 n int#5
43r9 n int#6
44r10 n ?
45r11 n
46r12-15 y
47eflags n n/a y
48st0-7 n n long double retreg y
49xmm0 n fp#1 fp retreg y
50xmm1 n fp#2 fp-high retreg y
51xmm2-7 n fp#3-8
52xmm8-15 n
53
sewardj069a0752006-03-12 13:36:06 +000054
55ppc32-linux
56~~~~~~~~~~~
57
58Reg Callee Arg
59Name Saves? Reg? Comment Vex-uses?
60-------------------------------------------------------------------
61r0 n n sometimes RAZ
62r1 y n stack pointer
63r2 n n
64r3 n int#1 int[31:0] retreg y
65r4 n int#2 also int retreg y
66r5 n int#3 y
67r6 n int#4 y
68r7 n int#5 y
69r8 n int#6 y
70r9 n int#7 y
71r10 n int#8 y
72r11 n y
73r12 n y
74r13 ?
75r14-28 y y
76r29 y reserved for dispatcher
77r30 y altivec spill temporary
78r31 y & guest state
79f0 n
80f1 n fp#1 fp retreg
81f2-8 n fp#2-8
82f9-13 n
83f14-31 y y (14-21)
84v0-v19 ?
85v20-31 y y (20-27,29)
86cr0-7
87lr y return address
88ctr n
89xer n
90fpscr
91
sewardjbcad5112006-10-17 01:48:02 +000092
93ppc64-linux
94~~~~~~~~~~~
95TBD
96
97
98ppc32-aix5
99~~~~~~~~~~
100
101Reg Callee Arg
102Name Saves? Reg? Comment Vex-uses?
103-------------------------------------------------------------------
104r0 n n sometimes RAZ
105r1 y n stack pointer
106r2 n n TOC pointer
107r3 n int#1 int[31:0] retreg y
108r4 n int#2 also int retreg y
109r5 n int#3 y
110r6 n int#4 y
111r7 n int#5 y
112r8 n int#6 y
113r9 n int#7 y
114r10 n int#8 y
115r11 n "env pointer?!" y
116r12 n "exn handling" y
117r13 ? "reserved in 64-bit env"
118r14-28 y y
119r29 y reserved for dispatcher
120r30 y altivec spill temporary
121r31 y & guest state
122f0 n
123f1 n fp#1 fp retreg
124f2-13 n fp#2-13
125f14-31 y y (14-21)
126v0-v19 ?
127v20-31 y y (20-27,29)
128cr0-7
129lr y return address
130ctr n
131xer n
132fpscr