| OLD | NEW |
| 1 //===- subzero/src/IceInstARM32.def - X-Macros for ARM32 insts --*- C++ -*-===// | 1 //===- subzero/src/IceInstARM32.def - X-Macros for ARM32 insts --*- C++ -*-===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // This file defines properties of ARM32 instructions in the form of x-macros. | 10 // This file defines properties of ARM32 instructions in the form of x-macros. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 {RegARM32::r0, RegARM32::r1, RegARM32::r2} | 39 {RegARM32::r0, RegARM32::r1, RegARM32::r2} |
| 40 #define ALIASES4(r0, r1, r2, r3) \ | 40 #define ALIASES4(r0, r1, r2, r3) \ |
| 41 {RegARM32::r0, RegARM32::r1, RegARM32::r2, RegARM32::r3} | 41 {RegARM32::r0, RegARM32::r1, RegARM32::r2, RegARM32::r3} |
| 42 #define ALIASES7(r0, r1, r2, r3, r4, r5, r6) \ | 42 #define ALIASES7(r0, r1, r2, r3, r4, r5, r6) \ |
| 43 {RegARM32::r0, RegARM32::r1, RegARM32::r2, RegARM32::r3, RegARM32::r4, \ | 43 {RegARM32::r0, RegARM32::r1, RegARM32::r2, RegARM32::r3, RegARM32::r4, \ |
| 44 RegARM32::r5,RegARM32::r6} | 44 RegARM32::r5,RegARM32::r6} |
| 45 | 45 |
| 46 | 46 |
| 47 #define REGARM32_GPR_TABLE \ | 47 #define REGARM32_GPR_TABLE \ |
| 48 /* val, encode, name, scratch, preserved, stackptr, frameptr, \ | 48 /* val, encode, name, scratch, preserved, stackptr, frameptr, \ |
| 49 isInt, isI64Pair, isFP32, isFP64, isVec128, aliases_init */ \ | 49 isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init */ \ |
| 50 X(Reg_r0, 0, "r0", 1, 0, 0, 0, 1, 0, 0, 0, 0, \ | 50 X(Reg_r0, 0, "r0", 1, 0, 0, 0, 1, 0, 0, 0, 0, \ |
| 51 ALIASES2(Reg_r0, Reg_r0r1)) \ | 51 ALIASES2(Reg_r0, Reg_r0r1)) \ |
| 52 X(Reg_r1, 1, "r1", 1, 0, 0, 0, 1, 0, 0, 0, 0, \ | 52 X(Reg_r1, 1, "r1", 1, 0, 0, 0, 1, 0, 0, 0, 0, \ |
| 53 ALIASES2(Reg_r1, Reg_r0r1)) \ | 53 ALIASES2(Reg_r1, Reg_r0r1)) \ |
| 54 X(Reg_r2, 2, "r2", 1, 0, 0, 0, 1, 0, 0, 0, 0, \ | 54 X(Reg_r2, 2, "r2", 1, 0, 0, 0, 1, 0, 0, 0, 0, \ |
| 55 ALIASES2(Reg_r2, Reg_r2r3)) \ | 55 ALIASES2(Reg_r2, Reg_r2r3)) \ |
| 56 X(Reg_r3, 3, "r3", 1, 0, 0, 0, 1, 0, 0, 0, 0, \ | 56 X(Reg_r3, 3, "r3", 1, 0, 0, 0, 1, 0, 0, 0, 0, \ |
| 57 ALIASES2(Reg_r3, Reg_r2r3)) \ | 57 ALIASES2(Reg_r3, Reg_r2r3)) \ |
| 58 X(Reg_r4, 4, "r4", 0, 1, 0, 0, 1, 0, 0, 0, 0, \ | 58 X(Reg_r4, 4, "r4", 0, 1, 0, 0, 1, 0, 0, 0, 0, \ |
| 59 ALIASES2(Reg_r4, Reg_r4r5)) \ | 59 ALIASES2(Reg_r4, Reg_r4r5)) \ |
| (...skipping 13 matching lines...) Expand all Loading... |
| 73 ALIASES2(Reg_fp, Reg_r10fp)) \ | 73 ALIASES2(Reg_fp, Reg_r10fp)) \ |
| 74 X(Reg_ip, 12, "ip", 1, 0, 0, 0, 0, 0, 0, 0, 0, \ | 74 X(Reg_ip, 12, "ip", 1, 0, 0, 0, 0, 0, 0, 0, 0, \ |
| 75 ALIASES1(Reg_ip)) \ | 75 ALIASES1(Reg_ip)) \ |
| 76 X(Reg_sp, 13, "sp", 0, 0, 1, 0, 0, 0, 0, 0, 0, \ | 76 X(Reg_sp, 13, "sp", 0, 0, 1, 0, 0, 0, 0, 0, 0, \ |
| 77 ALIASES1(Reg_sp)) \ | 77 ALIASES1(Reg_sp)) \ |
| 78 X(Reg_lr, 14, "lr", 0, 0, 0, 0, 0, 0, 0, 0, 0, \ | 78 X(Reg_lr, 14, "lr", 0, 0, 0, 0, 0, 0, 0, 0, 0, \ |
| 79 ALIASES1(Reg_lr)) \ | 79 ALIASES1(Reg_lr)) \ |
| 80 X(Reg_pc, 15, "pc", 0, 0, 0, 0, 0, 0, 0, 0, 0, \ | 80 X(Reg_pc, 15, "pc", 0, 0, 0, 0, 0, 0, 0, 0, 0, \ |
| 81 ALIASES1(Reg_pc)) | 81 ALIASES1(Reg_pc)) |
| 82 //#define X(val, encode, name, scratch, preserved, stackptr, frameptr, | 82 //#define X(val, encode, name, scratch, preserved, stackptr, frameptr, |
| 83 // isInt, isI64Pair, isFP32, isFP64, isVec128, aliases_init) | 83 // isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init) |
| 84 | 84 |
| 85 // The following defines a table with the available pairs of consecutive i32 | 85 // The following defines a table with the available pairs of consecutive i32 |
| 86 // GPRs starting at an even GPR that is not r14. Those are used to hold i64 | 86 // GPRs starting at an even GPR that is not r14. Those are used to hold i64 |
| 87 // variables for atomic memory operations. If one of the registers in the pair | 87 // variables for atomic memory operations. If one of the registers in the pair |
| 88 // is preserved, then we mark the whole pair as preserved to help the register | 88 // is preserved, then we mark the whole pair as preserved to help the register |
| 89 // allocator. | 89 // allocator. |
| 90 #define REGARM32_I64PAIR_TABLE \ | 90 #define REGARM32_I64PAIR_TABLE \ |
| 91 /* val, encode, name, scratch, preserved, stackptr, frameptr, \ | 91 /* val, encode, name, scratch, preserved, stackptr, frameptr, \ |
| 92 isInt, isI64Pair, isFP32, isFP64, isVec128, aliases_init */ \ | 92 isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init */ \ |
| 93 X(Reg_r0r1, 0, "r0, r1", 1, 0, 0, 0, 0, 1, 0, 0, 0, \ | 93 X(Reg_r0r1, 0, "r0, r1", 1, 0, 0, 0, 0, 1, 0, 0, 0, \ |
| 94 ALIASES3(Reg_r0, Reg_r1, Reg_r0r1)) \ | 94 ALIASES3(Reg_r0, Reg_r1, Reg_r0r1)) \ |
| 95 X(Reg_r2r3, 2, "r2, r3", 1, 0, 0, 0, 0, 1, 0, 0, 0, \ | 95 X(Reg_r2r3, 2, "r2, r3", 1, 0, 0, 0, 0, 1, 0, 0, 0, \ |
| 96 ALIASES3(Reg_r2, Reg_r3, Reg_r2r3)) \ | 96 ALIASES3(Reg_r2, Reg_r3, Reg_r2r3)) \ |
| 97 X(Reg_r4r5, 4, "r4, r5", 0, 1, 0, 0, 0, 1, 0, 0, 0, \ | 97 X(Reg_r4r5, 4, "r4, r5", 0, 1, 0, 0, 0, 1, 0, 0, 0, \ |
| 98 ALIASES3(Reg_r4, Reg_r5, Reg_r4r5)) \ | 98 ALIASES3(Reg_r4, Reg_r5, Reg_r4r5)) \ |
| 99 X(Reg_r6r7, 6, "r6, r7", 0, 1, 0, 0, 0, 1, 0, 0, 0, \ | 99 X(Reg_r6r7, 6, "r6, r7", 0, 1, 0, 0, 0, 1, 0, 0, 0, \ |
| 100 ALIASES3(Reg_r6, Reg_r7, Reg_r6r7)) \ | 100 ALIASES3(Reg_r6, Reg_r7, Reg_r6r7)) \ |
| 101 X(Reg_r8r9, 8, "r8, r9", 0, 1, 0, 0, 0, 0, 0, 0, 0, \ | 101 X(Reg_r8r9, 8, "r8, r9", 0, 1, 0, 0, 0, 0, 0, 0, 0, \ |
| 102 ALIASES3(Reg_r8, Reg_r9, Reg_r8r9)) \ | 102 ALIASES3(Reg_r8, Reg_r9, Reg_r8r9)) \ |
| 103 X(Reg_r10fp, 10, "r10, fp", 0, 1, 0, 0, 0, 0, 0, 0, 0, \ | 103 X(Reg_r10fp, 10, "r10, fp", 0, 1, 0, 0, 0, 0, 0, 0, 0, \ |
| 104 ALIASES3(Reg_r10, Reg_fp, Reg_r10fp)) \ | 104 ALIASES3(Reg_r10, Reg_fp, Reg_r10fp)) \ |
| 105 //#define X(val, encode, name, scratch, preserved, stackptr, frameptr, | 105 //#define X(val, encode, name, scratch, preserved, stackptr, frameptr, |
| 106 // isInt, isI64Pair, isFP32, isFP64, isVec128, aliases_init) | 106 // isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init) |
| 107 | 107 |
| 108 // S registers 0-15 are scratch, but 16-31 are preserved. | 108 // S registers 0-15 are scratch, but 16-31 are preserved. |
| 109 // Regenerate this with the following python script: | 109 // Regenerate this with the following python script: |
| 110 // | 110 // |
| 111 // def print_sregs(): | 111 // def print_sregs(): |
| 112 // for i in xrange(0, 32): | 112 // for i in xrange(0, 32): |
| 113 // is_scratch = 1 if i < 16 else 0 | 113 // is_scratch = 1 if i < 16 else 0 |
| 114 // is_preserved = 1 if i >= 16 else 0 | 114 // is_preserved = 1 if i >= 16 else 0 |
| 115 // print (' X(Reg_s{regnum:<2}, {regnum:<2}, "s{regnum}", ' + | 115 // print (' X(Reg_s{regnum:<2}, {regnum:<2}, "s{regnum}", ' + |
| 116 // '{scratch}, {preserved}, 0, 0, 0, 0, 1, 0, 0, ' + | 116 // '{scratch}, {preserved}, 0, 0, 0, 0, 1, 0, 0, ' + |
| 117 // 'ALIASES(Reg_s{regnum_s:<2}, Reg_d{regnum:<2}, ' + | 117 // 'ALIASES(Reg_s{regnum_s:<2}, Reg_d{regnum:<2}, ' + |
| 118 // 'Reg_q{regnum_q:<2})) \\').format( | 118 // 'Reg_q{regnum_q:<2})) \\').format( |
| 119 // regnum=i, regnum_d=i>>1, | 119 // regnum=i, regnum_d=i>>1, |
| 120 // regnum_q=i>>2, scratch=is_scratch, preserved=is_preserved) | 120 // regnum_q=i>>2, scratch=is_scratch, preserved=is_preserved) |
| 121 // | 121 // |
| 122 // print_sregs() | 122 // print_sregs() |
| 123 // | 123 // |
| 124 #define REGARM32_FP32_TABLE \ | 124 #define REGARM32_FP32_TABLE \ |
| 125 /* val, encode, name, scratch, preserved, stackptr, frameptr, \ | 125 /* val, encode, name, scratch, preserved, stackptr, frameptr, \ |
| 126 isInt, isI64Pair, isFP32, isFP64, isVec128, aliases_init */ \ | 126 isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init */ \ |
| 127 X(Reg_s0 , 0 , "s0" , 1, 0, 0, 0, 0, 0, 1, 0, 0, \ | 127 X(Reg_s0 , 0 , "s0" , 1, 0, 0, 0, 0, 0, 1, 0, 0, \ |
| 128 ALIASES3(Reg_s0 , Reg_d0 , Reg_q0)) \ | 128 ALIASES3(Reg_s0 , Reg_d0 , Reg_q0)) \ |
| 129 X(Reg_s1 , 1 , "s1" , 1, 0, 0, 0, 0, 0, 1, 0, 0, \ | 129 X(Reg_s1 , 1 , "s1" , 1, 0, 0, 0, 0, 0, 1, 0, 0, \ |
| 130 ALIASES3(Reg_s1 , Reg_d0 , Reg_q0)) \ | 130 ALIASES3(Reg_s1 , Reg_d0 , Reg_q0)) \ |
| 131 X(Reg_s2 , 2 , "s2" , 1, 0, 0, 0, 0, 0, 1, 0, 0, \ | 131 X(Reg_s2 , 2 , "s2" , 1, 0, 0, 0, 0, 0, 1, 0, 0, \ |
| 132 ALIASES3(Reg_s2 , Reg_d1 , Reg_q0)) \ | 132 ALIASES3(Reg_s2 , Reg_d1 , Reg_q0)) \ |
| 133 X(Reg_s3 , 3 , "s3" , 1, 0, 0, 0, 0, 0, 1, 0, 0, \ | 133 X(Reg_s3 , 3 , "s3" , 1, 0, 0, 0, 0, 0, 1, 0, 0, \ |
| 134 ALIASES3(Reg_s3 , Reg_d1 , Reg_q0)) \ | 134 ALIASES3(Reg_s3 , Reg_d1 , Reg_q0)) \ |
| 135 X(Reg_s4 , 4 , "s4" , 1, 0, 0, 0, 0, 0, 1, 0, 0, \ | 135 X(Reg_s4 , 4 , "s4" , 1, 0, 0, 0, 0, 0, 1, 0, 0, \ |
| 136 ALIASES3(Reg_s4 , Reg_d2 , Reg_q1)) \ | 136 ALIASES3(Reg_s4 , Reg_d2 , Reg_q1)) \ |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 ALIASES3(Reg_s27, Reg_d13, Reg_q6)) \ | 182 ALIASES3(Reg_s27, Reg_d13, Reg_q6)) \ |
| 183 X(Reg_s28, 28, "s28", 0, 1, 0, 0, 0, 0, 1, 0, 0, \ | 183 X(Reg_s28, 28, "s28", 0, 1, 0, 0, 0, 0, 1, 0, 0, \ |
| 184 ALIASES3(Reg_s28, Reg_d14, Reg_q7)) \ | 184 ALIASES3(Reg_s28, Reg_d14, Reg_q7)) \ |
| 185 X(Reg_s29, 29, "s29", 0, 1, 0, 0, 0, 0, 1, 0, 0, \ | 185 X(Reg_s29, 29, "s29", 0, 1, 0, 0, 0, 0, 1, 0, 0, \ |
| 186 ALIASES3(Reg_s29, Reg_d14, Reg_q7)) \ | 186 ALIASES3(Reg_s29, Reg_d14, Reg_q7)) \ |
| 187 X(Reg_s30, 30, "s30", 0, 1, 0, 0, 0, 0, 1, 0, 0, \ | 187 X(Reg_s30, 30, "s30", 0, 1, 0, 0, 0, 0, 1, 0, 0, \ |
| 188 ALIASES3(Reg_s30, Reg_d15, Reg_q7)) \ | 188 ALIASES3(Reg_s30, Reg_d15, Reg_q7)) \ |
| 189 X(Reg_s31, 31, "s31", 0, 1, 0, 0, 0, 0, 1, 0, 0, \ | 189 X(Reg_s31, 31, "s31", 0, 1, 0, 0, 0, 0, 1, 0, 0, \ |
| 190 ALIASES3(Reg_s31, Reg_d15, Reg_q7)) | 190 ALIASES3(Reg_s31, Reg_d15, Reg_q7)) |
| 191 //#define X(val, encode, name, scratch, preserved, stackptr, frameptr, | 191 //#define X(val, encode, name, scratch, preserved, stackptr, frameptr, |
| 192 // isInt, isI64Pair, isFP32,isFP64, isVec128, aliases_init) | 192 // isInt, isI64Pair, isFP32,isFP64, isVec128, alias_init) |
| 193 | 193 |
| 194 // D registers 0-7 are scratch, 8-15 are preserved, and 16-31 are also scratch | 194 // D registers 0-7 are scratch, 8-15 are preserved, and 16-31 are also scratch |
| 195 // (if supported by the D32 feature vs D16). D registers are defined in reverse | 195 // (if supported by the D32 feature vs D16). D registers are defined in reverse |
| 196 // order so that, during register allocation, Subzero will prefer higher D | 196 // order so that, during register allocation, Subzero will prefer higher D |
| 197 // registers. In processors supporting the D32 feature this will effectively | 197 // registers. In processors supporting the D32 feature this will effectively |
| 198 // cause double allocation to bias towards allocating "high" D registers, which | 198 // cause double allocation to bias towards allocating "high" D registers, which |
| 199 // do not alias any S registers. | 199 // do not alias any S registers. |
| 200 // | 200 // |
| 201 // Regenerate this with the following python script: | 201 // Regenerate this with the following python script: |
| 202 // def print_dregs(): | 202 // def print_dregs(): |
| (...skipping 12 matching lines...) Expand all Loading... |
| 215 // '{scratch}, {preserved}, 0, 0, 0, 0, 0, 1, 0, ' + | 215 // '{scratch}, {preserved}, 0, 0, 0, 0, 0, 1, 0, ' + |
| 216 // 'ALIASES(Reg_s{regnum_s0:<2}, Reg_s{regnum_s1:<2}, ' + | 216 // 'ALIASES(Reg_s{regnum_s0:<2}, Reg_s{regnum_s1:<2}, ' + |
| 217 // 'Reg_d{regnum:<2}, Reg_q{regnum_q:<2})) \\').format( | 217 // 'Reg_d{regnum:<2}, Reg_q{regnum_q:<2})) \\').format( |
| 218 // regnum_s0 = (i<<1), regnum_s1 = (i<<1) + 1, regnum=i, | 218 // regnum_s0 = (i<<1), regnum_s1 = (i<<1) + 1, regnum=i, |
| 219 // regnum_q=i>>1, scratch=is_scratch, preserved=is_preserved) | 219 // regnum_q=i>>1, scratch=is_scratch, preserved=is_preserved) |
| 220 // | 220 // |
| 221 // print_dregs() | 221 // print_dregs() |
| 222 // | 222 // |
| 223 #define REGARM32_FP64_TABLE \ | 223 #define REGARM32_FP64_TABLE \ |
| 224 /* val, encode, name, scratch, preserved, stackptr, frameptr, \ | 224 /* val, encode, name, scratch, preserved, stackptr, frameptr, \ |
| 225 isInt, isI64Pair, isFP32, isFP64, isVec128, aliases_init */ \ | 225 isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init */ \ |
| 226 X(Reg_d31, 31, "d31", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ | 226 X(Reg_d31, 31, "d31", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ |
| 227 ALIASES2(Reg_d31, Reg_q15)) \ | 227 ALIASES2(Reg_d31, Reg_q15)) \ |
| 228 X(Reg_d30, 30, "d30", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ | 228 X(Reg_d30, 30, "d30", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ |
| 229 ALIASES2(Reg_d30, Reg_q15)) \ | 229 ALIASES2(Reg_d30, Reg_q15)) \ |
| 230 X(Reg_d29, 29, "d29", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ | 230 X(Reg_d29, 29, "d29", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ |
| 231 ALIASES2(Reg_d29, Reg_q14)) \ | 231 ALIASES2(Reg_d29, Reg_q14)) \ |
| 232 X(Reg_d28, 28, "d28", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ | 232 X(Reg_d28, 28, "d28", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ |
| 233 ALIASES2(Reg_d28, Reg_q14)) \ | 233 ALIASES2(Reg_d28, Reg_q14)) \ |
| 234 X(Reg_d27, 27, "d27", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ | 234 X(Reg_d27, 27, "d27", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ |
| 235 ALIASES2(Reg_d27, Reg_q13)) \ | 235 ALIASES2(Reg_d27, Reg_q13)) \ |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 ALIASES4(Reg_s8 , Reg_s9 , Reg_d4 , Reg_q2)) \ | 281 ALIASES4(Reg_s8 , Reg_s9 , Reg_d4 , Reg_q2)) \ |
| 282 X(Reg_d3 , 3 , "d3", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ | 282 X(Reg_d3 , 3 , "d3", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ |
| 283 ALIASES4(Reg_s6 , Reg_s7 , Reg_d3 , Reg_q1)) \ | 283 ALIASES4(Reg_s6 , Reg_s7 , Reg_d3 , Reg_q1)) \ |
| 284 X(Reg_d2 , 2 , "d2", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ | 284 X(Reg_d2 , 2 , "d2", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ |
| 285 ALIASES4(Reg_s4 , Reg_s5 , Reg_d2 , Reg_q1)) \ | 285 ALIASES4(Reg_s4 , Reg_s5 , Reg_d2 , Reg_q1)) \ |
| 286 X(Reg_d1 , 1 , "d1", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ | 286 X(Reg_d1 , 1 , "d1", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ |
| 287 ALIASES4(Reg_s2 , Reg_s3 , Reg_d1 , Reg_q0)) \ | 287 ALIASES4(Reg_s2 , Reg_s3 , Reg_d1 , Reg_q0)) \ |
| 288 X(Reg_d0 , 0 , "d0", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ | 288 X(Reg_d0 , 0 , "d0", 1, 0, 0, 0, 0, 0, 0, 1, 0, \ |
| 289 ALIASES4(Reg_s0 , Reg_s1 , Reg_d0 , Reg_q0)) | 289 ALIASES4(Reg_s0 , Reg_s1 , Reg_d0 , Reg_q0)) |
| 290 //#define X(val, encode, name, scratch, preserved, stackptr, frameptr, | 290 //#define X(val, encode, name, scratch, preserved, stackptr, frameptr, |
| 291 // isInt, isI64Pair, isFP32, isFP64, isVec128, aliases_init) | 291 // isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init) |
| 292 | 292 |
| 293 // Q registers 0-3 are scratch, 4-7 are preserved, and 8-15 are also scratch | 293 // Q registers 0-3 are scratch, 4-7 are preserved, and 8-15 are also scratch |
| 294 // (if supported by the D32 feature). Q registers are defined in reverse order | 294 // (if supported by the D32 feature). Q registers are defined in reverse order |
| 295 // for the same reason as D registers. | 295 // for the same reason as D registers. |
| 296 // | 296 // |
| 297 // Regenerate this with the following python script: | 297 // Regenerate this with the following python script: |
| 298 // def print_qregs(): | 298 // def print_qregs(): |
| 299 // for i in xrange(15, 7, -1): | 299 // for i in xrange(15, 7, -1): |
| 300 // is_scratch = 1 if (i < 4 or i >= 8) else 0 | 300 // is_scratch = 1 if (i < 4 or i >= 8) else 0 |
| 301 // is_preserved = 1 if (4 <= i and i < 8) else 0 | 301 // is_preserved = 1 if (4 <= i and i < 8) else 0 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 X(Reg_q3 , 3 , "q3", 1, 0, 0, 0, 0, 0, 0, 0, 1, \ | 350 X(Reg_q3 , 3 , "q3", 1, 0, 0, 0, 0, 0, 0, 0, 1, \ |
| 351 ALIASES7(Reg_s12, Reg_s13, Reg_s14, Reg_s15, Reg_d6 , Reg_d7 , Reg_q3)) \ | 351 ALIASES7(Reg_s12, Reg_s13, Reg_s14, Reg_s15, Reg_d6 , Reg_d7 , Reg_q3)) \ |
| 352 X(Reg_q2 , 2 , "q2", 1, 0, 0, 0, 0, 0, 0, 0, 1, \ | 352 X(Reg_q2 , 2 , "q2", 1, 0, 0, 0, 0, 0, 0, 0, 1, \ |
| 353 ALIASES7(Reg_s8 , Reg_s9 , Reg_s10, Reg_s11, Reg_d4 , Reg_d5 , Reg_q2)) \ | 353 ALIASES7(Reg_s8 , Reg_s9 , Reg_s10, Reg_s11, Reg_d4 , Reg_d5 , Reg_q2)) \ |
| 354 X(Reg_q1 , 1 , "q1", 1, 0, 0, 0, 0, 0, 0, 0, 1, \ | 354 X(Reg_q1 , 1 , "q1", 1, 0, 0, 0, 0, 0, 0, 0, 1, \ |
| 355 ALIASES7(Reg_s4 , Reg_s5 , Reg_s6 , Reg_s7 , Reg_d2 , Reg_d3 , Reg_q1)) \ | 355 ALIASES7(Reg_s4 , Reg_s5 , Reg_s6 , Reg_s7 , Reg_d2 , Reg_d3 , Reg_q1)) \ |
| 356 X(Reg_q0 , 0 , "q0", 1, 0, 0, 0, 0, 0, 0, 0, 1, \ | 356 X(Reg_q0 , 0 , "q0", 1, 0, 0, 0, 0, 0, 0, 0, 1, \ |
| 357 ALIASES7(Reg_s0 , Reg_s1 , Reg_s2 , Reg_s3 , Reg_d0 , Reg_d1 , Reg_q0)) | 357 ALIASES7(Reg_s0 , Reg_s1 , Reg_s2 , Reg_s3 , Reg_d0 , Reg_d1 , Reg_q0)) |
| 358 //#define X(val, encode, name, scratch, preserved, stackptr, frameptr, | 358 //#define X(val, encode, name, scratch, preserved, stackptr, frameptr, |
| 359 // isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init) | 359 // isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init) |
| 360 #undef ALIASES | |
| 361 | 360 |
| 362 // We also provide a combined table, so that there is a namespace where all of | 361 // We also provide a combined table, so that there is a namespace where all of |
| 363 // the registers are considered and have distinct numberings. This is in | 362 // the registers are considered and have distinct numberings. This is in |
| 364 // contrast to the above, where the "encode" is based on how the register | 363 // contrast to the above, where the "encode" is based on how the register |
| 365 // numbers will be encoded in binaries and values can overlap. | 364 // numbers will be encoded in binaries and values can overlap. |
| 366 #define REGARM32_TABLE \ | 365 #define REGARM32_TABLE \ |
| 367 /* val, encode, name, scratch, preserved, stackptr, frameptr, isInt, \ | 366 /* val, encode, name, scratch, preserved, stackptr, frameptr, isInt, \ |
| 368 isFP32, isFP64, isVec128, alias_init */ \ | 367 isFP32, isFP64, isVec128, alias_init */ \ |
| 369 REGARM32_GPR_TABLE \ | 368 REGARM32_GPR_TABLE \ |
| 370 REGARM32_I64PAIR_TABLE \ | 369 REGARM32_I64PAIR_TABLE \ |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 X(LS, 9 , HI, "ls") /* unsigned lower or same */ \ | 437 X(LS, 9 , HI, "ls") /* unsigned lower or same */ \ |
| 439 X(GE, 10, LT, "ge") /* signed greater than or equal */ \ | 438 X(GE, 10, LT, "ge") /* signed greater than or equal */ \ |
| 440 X(LT, 11, GE, "lt") /* signed less than */ \ | 439 X(LT, 11, GE, "lt") /* signed less than */ \ |
| 441 X(GT, 12, LE, "gt") /* signed greater than */ \ | 440 X(GT, 12, LE, "gt") /* signed greater than */ \ |
| 442 X(LE, 13, GT, "le") /* signed less than or equal */ \ | 441 X(LE, 13, GT, "le") /* signed less than or equal */ \ |
| 443 X(AL, 14, kNone, "") /* always (unconditional) */ \ | 442 X(AL, 14, kNone, "") /* always (unconditional) */ \ |
| 444 X(kNone, 15, kNone, "??") /* special condition / none */ | 443 X(kNone, 15, kNone, "??") /* special condition / none */ |
| 445 //#define X(tag, encode, opp, emit) | 444 //#define X(tag, encode, opp, emit) |
| 446 | 445 |
| 447 #endif // SUBZERO_SRC_ICEINSTARM32_DEF | 446 #endif // SUBZERO_SRC_ICEINSTARM32_DEF |
| OLD | NEW |