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