41 #ifndef __ARCH_ARM_INSTS_PREDINST_HH__
42 #define __ARCH_ARM_INSTS_PREDINST_HH__
50 static inline uint32_t
54 return rotateValue == 0 ? immValue :
55 (immValue >> rotateValue) | (immValue << (32 - rotateValue));
58 static inline uint32_t
61 uint32_t bigData = dataImm;
62 uint32_t bigCtrl = ctrlImm;
68 return bigData | (bigData << 16);
70 return (bigData << 8) | (bigData << 24);
72 return (bigData << 0) | (bigData << 8) |
73 (bigData << 16) | (bigData << 24);
76 bigCtrl = (bigCtrl << 1) | ((bigData >> 7) & 0x1);
78 return bigData << (32 - bigCtrl);
81 static inline uint64_t
83 bool isAarch64 =
false)
85 uint64_t bigData =
data;
90 bigData = (bigData << 0) | (bigData << 32);
94 bigData = (bigData << 8) | (bigData << 40);
98 bigData = (bigData << 16) | (bigData << 48);
102 bigData = (bigData << 24) | (bigData << 56);
106 bigData = (bigData << 0) | (bigData << 16) |
107 (bigData << 32) | (bigData << 48);
111 bigData = (bigData << 8) | (bigData << 24) |
112 (bigData << 40) | (bigData << 56);
115 bigData = (0xff
ULL << 0) | (bigData << 8) |
116 (0xff
ULL << 32) | (bigData << 40);
119 bigData = (0xffff
ULL << 0) | (bigData << 16) |
120 (0xffff
ULL << 32) | (bigData << 48);
125 for (
int i = 7;
i >= 0;
i--) {
127 bigData |= (
ULL(0xFF) << (
i * 8));
131 bigData = (bigData << 0) | (bigData << 8) |
132 (bigData << 16) | (bigData << 24) |
133 (bigData << 32) | (bigData << 40) |
134 (bigData << 48) | (bigData << 56);
141 bVal =
bits(bigData, 6) ? (0x1F) : (0x20);
142 bigData = (
bits(bigData, 5, 0) << 19) |
143 (bVal << 25) | (
bits(bigData, 7) << 31);
144 bigData |= (bigData << 32);
146 }
else if (isAarch64) {
147 bVal =
bits(bigData, 6) ? (0x0FF) : (0x100);
148 bigData = (
bits(bigData, 5, 0) << 48) |
149 (bVal << 54) | (
bits(bigData, 7) << 63);
164 static inline uint64_t
167 uint64_t bigData =
data;
172 bigData = (
bits(bigData, 5, 0) << 6) |
173 (repData << 12) | (
bits(~bigData, 6) << 14) |
174 (
bits(bigData, 7) << 15);
178 bigData = (
bits(bigData, 5, 0) << 19) |
179 (repData << 25) | (
bits(~bigData, 6) << 30) |
180 (
bits(bigData, 7) << 31);
184 bigData = (
bits(bigData, 5, 0) << 48) |
185 (repData << 54) | (
bits(~bigData, 6) << 62) |
186 (
bits(bigData, 7) << 63);
189 panic(
"Unrecognized FP data type");
203 "Invalid floating point data type in VFP/SIMD or SVE instruction");
243 PredOp(mnem, _machInst, __opClass),
268 PredOp(mnem, _machInst, __opClass),
288 PredOp(mnem, _machInst, __opClass),
306 PredOp(mnem, _machInst, __opClass),
324 PredOp(mnem, _machInst, __opClass),
345 PredOp(mnem, _machInst, __opClass),
351 flags[IsMacroop] =
true;
370 panic(
"Execute method called when it shouldn't!");
384 PredOp(mnem, _machInst, __opClass)
386 flags[IsMicroop] =
true;
392 if (
flags[IsLastMicroop])
400 #endif //__ARCH_ARM_INSTS_PREDINST_HH__