| 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 17 matching lines...) Expand all Loading... |
| 28 // LR is not considered isInt to avoid being allocated as a register. It is | 28 // LR is not considered isInt to avoid being allocated as a register. It is |
| 29 // technically preserved, but save/restore is handled separately, based on | 29 // technically preserved, but save/restore is handled separately, based on |
| 30 // whether or not the function MaybeLeafFunc. | 30 // whether or not the function MaybeLeafFunc. |
| 31 // | 31 // |
| 32 // The register tables can be generated using the gen_arm32_reg_tables.py | 32 // The register tables can be generated using the gen_arm32_reg_tables.py |
| 33 // script. | 33 // script. |
| 34 | 34 |
| 35 #include "IceRegistersARM32.def" | 35 #include "IceRegistersARM32.def" |
| 36 // The register tables defined in IceRegistersARM32 use the following x-macro: | 36 // The register tables defined in IceRegistersARM32 use the following x-macro: |
| 37 //#define X(val, encode, name, cc_arg, scratch, preserved, stackptr, frameptr, | 37 //#define X(val, encode, name, cc_arg, scratch, preserved, stackptr, frameptr, |
| 38 // isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init) | 38 // isGPR, isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init) |
| 39 | 39 |
| 40 // We also provide a combined table, so that there is a namespace where all of | 40 // We also provide a combined table, so that there is a namespace where all of |
| 41 // the registers are considered and have distinct numberings. This is in | 41 // the registers are considered and have distinct numberings. This is in |
| 42 // contrast to the above, where the "encode" is based on how the register | 42 // contrast to the above, where the "encode" is based on how the register |
| 43 // numbers will be encoded in binaries and values can overlap. | 43 // numbers will be encoded in binaries and values can overlap. |
| 44 #define REGARM32_TABLE \ | 44 #define REGARM32_TABLE \ |
| 45 /* val, encode, name, cc_arg, scratch, preserved, stackptr, frameptr, \ | 45 /* val, encode, name, cc_arg, scratch, preserved, stackptr, frameptr, \ |
| 46 isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init */ \ | 46 isGPR, isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init */ \ |
| 47 REGARM32_GPR_TABLE \ | 47 REGARM32_GPR_TABLE \ |
| 48 REGARM32_I64PAIR_TABLE \ | 48 REGARM32_I64PAIR_TABLE \ |
| 49 REGARM32_FP32_TABLE \ | 49 REGARM32_FP32_TABLE \ |
| 50 REGARM32_FP64_TABLE \ | 50 REGARM32_FP64_TABLE \ |
| 51 REGARM32_VEC128_TABLE | 51 REGARM32_VEC128_TABLE |
| 52 //#define X(val, encode, name, cc_arg, scratch, preserved, stackptr, frameptr, | 52 //#define X(val, encode, name, cc_arg, scratch, preserved, stackptr, frameptr, |
| 53 // isInt, isFP32, isFP64, isVec128, alias_init) | 53 // isGPR, isInt, isFP32, isFP64, isVec128, alias_init) |
| 54 | 54 |
| 55 #define REGARM32_TABLE_BOUNDS \ | 55 #define REGARM32_TABLE_BOUNDS \ |
| 56 /* val, init */ \ | 56 /* val, init */ \ |
| 57 X(Reg_GPR_First, = Reg_r0) \ | 57 X(Reg_GPR_First, = Reg_r0) \ |
| 58 X(Reg_GPR_Last, = Reg_pc) \ | 58 X(Reg_GPR_Last, = Reg_pc) \ |
| 59 X(Reg_I64PAIR_First, = Reg_r0r1) \ | 59 X(Reg_I64PAIR_First, = Reg_r0r1) \ |
| 60 X(Reg_I64PAIR_Last, = Reg_r10fp) \ | 60 X(Reg_I64PAIR_Last, = Reg_r10fp) \ |
| 61 X(Reg_SREG_First, = Reg_s0) \ | 61 X(Reg_SREG_First, = Reg_s0) \ |
| 62 X(Reg_SREG_Last, = Reg_s31) \ | 62 X(Reg_SREG_Last, = Reg_s31) \ |
| 63 X(Reg_DREG_First, = Reg_d0) \ | 63 X(Reg_DREG_First, = Reg_d0) \ |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 X(LS, 9, HI, "ls") /* unsigned lower or same */ \ | 116 X(LS, 9, HI, "ls") /* unsigned lower or same */ \ |
| 117 X(GE, 10, LT, "ge") /* signed greater than or equal */ \ | 117 X(GE, 10, LT, "ge") /* signed greater than or equal */ \ |
| 118 X(LT, 11, GE, "lt") /* signed less than */ \ | 118 X(LT, 11, GE, "lt") /* signed less than */ \ |
| 119 X(GT, 12, LE, "gt") /* signed greater than */ \ | 119 X(GT, 12, LE, "gt") /* signed greater than */ \ |
| 120 X(LE, 13, GT, "le") /* signed less than or equal */ \ | 120 X(LE, 13, GT, "le") /* signed less than or equal */ \ |
| 121 X(AL, 14, kNone, "") /* always (unconditional) */ \ | 121 X(AL, 14, kNone, "") /* always (unconditional) */ \ |
| 122 X(kNone, 15, kNone, "??") /* special condition / none */ | 122 X(kNone, 15, kNone, "??") /* special condition / none */ |
| 123 //#define X(tag, encode, opp, emit) | 123 //#define X(tag, encode, opp, emit) |
| 124 | 124 |
| 125 #endif // SUBZERO_SRC_ICEINSTARM32_DEF | 125 #endif // SUBZERO_SRC_ICEINSTARM32_DEF |
| OLD | NEW |