Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1368)

Side by Side Diff: src/IceRegistersARM32.h

Issue 1554203002: Subzero. ARM32. Adds an IsGPR attribute to the register tables. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceInstARM32.def ('k') | src/IceRegistersARM32.def » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceRegistersARM32.h - Register information ---*- C++ -*-===// 1 //===- subzero/src/IceRegistersARM32.h - Register information ---*- 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 /// \file 10 /// \file
(...skipping 11 matching lines...) Expand all
22 22
23 namespace Ice { 23 namespace Ice {
24 namespace ARM32 { 24 namespace ARM32 {
25 25
26 class RegARM32 { 26 class RegARM32 {
27 public: 27 public:
28 /// An enum of every register. The enum value may not match the encoding used 28 /// An enum of every register. The enum value may not match the encoding used
29 /// to binary encode register operands in instructions. 29 /// to binary encode register operands in instructions.
30 enum AllRegisters { 30 enum AllRegisters {
31 #define X(val, encode, name, cc_arg, scratch, preserved, stackptr, frameptr, \ 31 #define X(val, encode, name, cc_arg, scratch, preserved, stackptr, frameptr, \
32 isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init) \ 32 isGPR, isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init) \
33 val, 33 val,
34 REGARM32_TABLE 34 REGARM32_TABLE
35 #undef X 35 #undef X
36 Reg_NUM, 36 Reg_NUM,
37 #define X(val, init) val init, 37 #define X(val, init) val init,
38 REGARM32_TABLE_BOUNDS 38 REGARM32_TABLE_BOUNDS
39 #undef X 39 #undef X
40 }; 40 };
41 41
42 /// An enum of GPR Registers. The enum value does match the encoding used to 42 /// An enum of GPR Registers. The enum value does match the encoding used to
43 /// binary encode register operands in instructions. 43 /// binary encode register operands in instructions.
44 enum GPRRegister { 44 enum GPRRegister {
45 #define X(val, encode, name, cc_arg, scratch, preserved, stackptr, frameptr, \ 45 #define X(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 Encoded_##val = encode, 47 Encoded_##val = encode,
48 REGARM32_GPR_TABLE 48 REGARM32_GPR_TABLE
49 #undef X 49 #undef X
50 Encoded_Not_GPR = -1 50 Encoded_Not_GPR = -1
51 }; 51 };
52 52
53 /// An enum of FP32 S-Registers. The enum value does match the encoding used 53 /// An enum of FP32 S-Registers. The enum value does match the encoding used
54 /// to binary encode register operands in instructions. 54 /// to binary encode register operands in instructions.
55 enum SRegister { 55 enum SRegister {
56 #define X(val, encode, name, cc_arg, scratch, preserved, stackptr, frameptr, \ 56 #define X(val, encode, name, cc_arg, scratch, preserved, stackptr, frameptr, \
57 isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init) \ 57 isGPR, isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init) \
58 Encoded_##val = encode, 58 Encoded_##val = encode,
59 REGARM32_FP32_TABLE 59 REGARM32_FP32_TABLE
60 #undef X 60 #undef X
61 Encoded_Not_SReg = -1 61 Encoded_Not_SReg = -1
62 }; 62 };
63 63
64 /// An enum of FP64 D-Registers. The enum value does match the encoding used 64 /// An enum of FP64 D-Registers. The enum value does match the encoding used
65 /// to binary encode register operands in instructions. 65 /// to binary encode register operands in instructions.
66 enum DRegister { 66 enum DRegister {
67 #define X(val, encode, name, cc_arg, scratch, preserved, stackptr, frameptr, \ 67 #define X(val, encode, name, cc_arg, scratch, preserved, stackptr, frameptr, \
68 isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init) \ 68 isGPR, isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init) \
69 Encoded_##val = encode, 69 Encoded_##val = encode,
70 REGARM32_FP64_TABLE 70 REGARM32_FP64_TABLE
71 #undef X 71 #undef X
72 Encoded_Not_DReg = -1 72 Encoded_Not_DReg = -1
73 }; 73 };
74 74
75 /// An enum of 128-bit Q-Registers. The enum value does match the encoding 75 /// An enum of 128-bit Q-Registers. The enum value does match the encoding
76 /// used to binary encode register operands in instructions. 76 /// used to binary encode register operands in instructions.
77 enum QRegister { 77 enum QRegister {
78 #define X(val, encode, name, cc_arg, scratch, preserved, stackptr, frameptr, \ 78 #define X(val, encode, name, cc_arg, scratch, preserved, stackptr, frameptr, \
79 isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init) \ 79 isGPR, isInt, isI64Pair, isFP32, isFP64, isVec128, alias_init) \
80 Encoded_##val = encode, 80 Encoded_##val = encode,
81 REGARM32_VEC128_TABLE 81 REGARM32_VEC128_TABLE
82 #undef X 82 #undef X
83 Encoded_Not_QReg = -1 83 Encoded_Not_QReg = -1
84 }; 84 };
85 85
86 static inline GPRRegister getEncodedGPR(int32_t RegNum) { 86 static inline GPRRegister getEncodedGPR(int32_t RegNum) {
87 assert(Reg_GPR_First <= RegNum); 87 assert(Reg_GPR_First <= RegNum);
88 assert(RegNum <= Reg_GPR_Last); 88 assert(RegNum <= Reg_GPR_Last);
89 return GPRRegister(RegNum - Reg_GPR_First); 89 return GPRRegister(RegNum - Reg_GPR_First);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 static const char *RegNames[]; 134 static const char *RegNames[];
135 }; 135 };
136 136
137 // Extend enum RegClass with ARM32-specific register classes (if any). 137 // Extend enum RegClass with ARM32-specific register classes (if any).
138 enum RegClassARM32 : uint8_t { RCARM32_NUM = RC_Target }; 138 enum RegClassARM32 : uint8_t { RCARM32_NUM = RC_Target };
139 139
140 } // end of namespace ARM32 140 } // end of namespace ARM32
141 } // end of namespace Ice 141 } // end of namespace Ice
142 142
143 #endif // SUBZERO_SRC_ICEREGISTERSARM32_H 143 #endif // SUBZERO_SRC_ICEREGISTERSARM32_H
OLDNEW
« no previous file with comments | « src/IceInstARM32.def ('k') | src/IceRegistersARM32.def » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698