Changeset 106626 in vbox
- Timestamp:
- Oct 23, 2024 4:54:39 PM (5 weeks ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/disopcode-armv8.h
r106061 r106626 439 439 OP_ARMV8_A64_SHL, 440 440 OP_ARMV8_A64_SMADDL, 441 OP_ARMV8_A64_SMAX, 441 442 OP_ARMV8_A64_SMC, 443 OP_ARMV8_A64_SMIN, 442 444 OP_ARMV8_A64_SMNEGL, 443 445 OP_ARMV8_A64_SMSTART, … … 547 549 OP_ARMV8_A64_UDIV, 548 550 OP_ARMV8_A64_UMADDL, 551 OP_ARMV8_A64_UMAX, 552 OP_ARMV8_A64_UMIN, 549 553 OP_ARMV8_A64_UMNEGL, 550 554 OP_ARMV8_A64_UMSUBL, -
trunk/src/VBox/Disassembler/DisasmCore-armv8.cpp
r106618 r106626 80 80 static FNDISPARSEARMV8 disArmV8ParseImmZero; 81 81 static FNDISPARSEARMV8 disArmV8ParseGprZr; 82 static FNDISPARSEARMV8 disArmV8ParseGprZr32; 83 static FNDISPARSEARMV8 disArmV8ParseGprZr64; 82 84 static FNDISPARSEARMV8 disArmV8ParseGprSp; 83 85 static FNDISPARSEARMV8 disArmV8ParseGprOff; … … 129 131 disArmV8ParseImmZero, 130 132 disArmV8ParseGprZr, 133 disArmV8ParseGprZr32, 134 disArmV8ParseGprZr64, 131 135 disArmV8ParseGprSp, 132 136 disArmV8ParseGprOff, … … 306 310 307 311 312 static int disArmV8ParseGprZr32(PDISSTATE pDis, uint32_t u32Insn, PCDISARMV8OPCODE pOp, PCDISARMV8INSNCLASS pInsnClass, PDISOPPARAM pParam, PCDISARMV8INSNPARAM pInsnParm, bool *pf64Bit) 313 { 314 RT_NOREF(pDis, pOp, pInsnClass, pf64Bit); 315 pParam->armv8.Op.Reg.idReg = disArmV8ExtractBitVecFromInsn(u32Insn, pInsnParm->idxBitStart, pInsnParm->cBits); 316 pParam->armv8.Op.Reg.enmRegType = kDisOpParamArmV8RegType_Gpr_32Bit; 317 return VINF_SUCCESS; 318 } 319 320 321 static int disArmV8ParseGprZr64(PDISSTATE pDis, uint32_t u32Insn, PCDISARMV8OPCODE pOp, PCDISARMV8INSNCLASS pInsnClass, PDISOPPARAM pParam, PCDISARMV8INSNPARAM pInsnParm, bool *pf64Bit) 322 { 323 RT_NOREF(pDis, pOp, pInsnClass, pf64Bit); 324 pParam->armv8.Op.Reg.idReg = disArmV8ExtractBitVecFromInsn(u32Insn, pInsnParm->idxBitStart, pInsnParm->cBits); 325 pParam->armv8.Op.Reg.enmRegType = kDisOpParamArmV8RegType_Gpr_64Bit; 326 return VINF_SUCCESS; 327 } 328 329 308 330 static int disArmV8ParseGprSp(PDISSTATE pDis, uint32_t u32Insn, PCDISARMV8OPCODE pOp, PCDISARMV8INSNCLASS pInsnClass, PDISOPPARAM pParam, PCDISARMV8INSNPARAM pInsnParm, bool *pf64Bit) 309 331 { … … 950 972 int rc = VINF_SUCCESS; 951 973 PCDISARMV8INSNPARAM pDecode = &pInsnClass->paParms[0]; 974 if (pOp->paDecode) 975 pDecode = &pOp->paDecode[0]; 952 976 while ( (pDecode->idxParse != kDisParmParseNop) 953 977 && RT_SUCCESS(rc)) -
trunk/src/VBox/Disassembler/DisasmInternal-armv8.h
r106618 r106626 57 57 kDisParmParseImmZero, 58 58 kDisParmParseGprZr, 59 kDisParmParseGprZr32, 60 kDisParmParseGprZr64, 59 61 kDisParmParseGprSp, 60 62 kDisParmParseGprOff, … … 89 91 90 92 /** 91 * Opcode structure. 92 */ 93 typedef struct DISARMV8OPCODE 94 { 95 /** The value of the fixed bits of the instruction. */ 96 uint32_t fValue; 97 /** Special flags for the opcode. */ 98 uint32_t fFlags; 99 /** The generic opcode structure. */ 100 DISOPCODE Opc; 101 } DISARMV8OPCODE; 102 /** Pointer to a const opcode. */ 103 typedef const DISARMV8OPCODE *PCDISARMV8OPCODE; 104 105 93 * Decoder step. 94 */ 106 95 typedef struct DISARMV8INSNPARAM 107 96 { … … 123 112 124 113 #define DIS_ARMV8_INSN_PARAM_UNSET UINT8_MAX 114 115 116 /** 117 * Opcode structure. 118 */ 119 typedef struct DISARMV8OPCODE 120 { 121 /** The value of the fixed bits of the instruction. */ 122 uint32_t fValue; 123 /** Special flags for the opcode. */ 124 uint32_t fFlags; 125 /** Pointer to an alternative decoder overriding the default one for the instruction class. */ 126 PCDISARMV8INSNPARAM paDecode; 127 /** The generic opcode structure. */ 128 DISOPCODE Opc; 129 } DISARMV8OPCODE; 130 /** Pointer to a const opcode. */ 131 typedef const DISARMV8OPCODE *PCDISARMV8OPCODE; 132 125 133 126 134 /** … … 200 208 201 209 210 #define DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(a_Name) \ 211 static const DISARMV8INSNPARAM g_aArmV8A64Insn ## a_Name ## Decode[] = { 212 #define DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER_ALTERNATIVE(a_Name) \ 213 DIS_ARMV8_INSN_DECODE_TERM \ 214 }; \ 215 static const DISARMV8INSNPARAM g_aArmV8A64Insn ## a_Name ## Decode[] = { 202 216 #define DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(a_Name) \ 217 DIS_ARMV8_INSN_DECODE_TERM \ 218 }; \ 203 219 static const DISARMV8OPCODE g_aArmV8A64Insn ## a_Name ## Opcodes[] = { 204 #define DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(a_Name) \205 }; \206 static const DISARMV8INSNPARAM g_aArmV8A64Insn ## a_Name ## Decode[] = {207 220 #define DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_4(a_Name, a_fFixedInsn, a_enmOpcDecode, a_fMask, a_cShift, \ 208 221 a_enmParamType1, a_enmParamType2, a_enmParamType3, a_enmParamType4) \ 209 DIS_ARMV8_INSN_DECODE_TERM \210 222 }; \ 211 223 static const DISARMV8INSNCLASS g_aArmV8A64Insn ## a_Name = { { kDisArmV8DecodeType_InsnClass, \ … … 231 243 kDisArmv8OpParmNone) 232 244 245 233 246 #define DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END \ 234 247 DIS_ARMV8_INSN_PARAM_NONE } -
trunk/src/VBox/Disassembler/DisasmTables-armv8-a64-simd-fp.cpp.h
r106618 r106626 75 75 * Note: The opcode is selected based on the <opcode> field. 76 76 */ 77 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpFixedPConvGpr2FpReg) 78 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET), 79 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET), 80 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 0, 5, 0 /*idxParam*/), 81 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 5, 5, 1 /*idxParam*/), 82 DIS_ARMV8_INSN_DECODE(kDisParmParseFpScale, 10, 6, 2 /*idxParam*/), 77 83 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(DataProcFpFixedPConvGpr2FpReg) 78 84 INVALID_OPCODE, … … 84 90 INVALID_OPCODE, 85 91 INVALID_OPCODE, 86 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpFixedPConvGpr2FpReg)87 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET),88 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET),89 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 0, 5, 0 /*idxParam*/),90 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 5, 5, 1 /*idxParam*/),91 DIS_ARMV8_INSN_DECODE(kDisParmParseFpScale, 10, 6, 2 /*idxParam*/),92 92 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(DataProcFpFixedPConvGpr2FpReg, 0x7f3f0000 /*fFixedInsn*/, 93 93 kDisArmV8OpcDecodeNop, … … 101 101 * Note: The opcode is selected based on the <opcode> field. 102 102 */ 103 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpFixedPConvFpReg2Gpr) 104 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET), 105 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET), 106 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 107 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 5, 5, 1 /*idxParam*/), 108 DIS_ARMV8_INSN_DECODE(kDisParmParseFpScale, 10, 6, 2 /*idxParam*/), 103 109 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(DataProcFpFixedPConvFpReg2Gpr) 104 110 DIS_ARMV8_OP(0x1e180000, "fcvtzs", OP_ARMV8_A64_FCVTZS, DISOPTYPE_HARMLESS), … … 110 116 INVALID_OPCODE, 111 117 INVALID_OPCODE, 112 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpFixedPConvFpReg2Gpr)113 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET),114 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET),115 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/),116 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 5, 5, 1 /*idxParam*/),117 DIS_ARMV8_INSN_DECODE(kDisParmParseFpScale, 10, 6, 2 /*idxParam*/),118 118 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(DataProcFpFixedPConvFpReg2Gpr, 0x7f3f0000 /*fFixedInsn*/, 119 119 kDisArmV8OpcDecodeNop, … … 147 147 * Note: The opcode is selected based on the <rmode>:<opcode> field. 148 148 */ 149 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(DataProcFpConvInt) /** @todo */150 INVALID_OPCODE,151 149 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpConvInt) 152 150 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET), … … 154 152 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 0, 5, 0 /*idxParam*/), 155 153 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 5, 5, 1 /*idxParam*/), 154 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(DataProcFpConvInt) /** @todo */ 155 INVALID_OPCODE, 156 156 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_2(DataProcFpConvInt, 0xff3ffc00 /*fFixedInsn*/, 157 157 kDisArmV8OpcDecodeNop, … … 165 165 * Note: The opcode is selected based on the <opcode> field. 166 166 */ 167 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(DataProcFpCondSelect)168 DIS_ARMV8_OP(0x1e200c00, "fcsel", OP_ARMV8_A64_FCSEL, DISOPTYPE_HARMLESS),169 167 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpCondSelect) 170 168 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET), … … 173 171 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 16, 5, 2 /*idxParam*/), 174 172 DIS_ARMV8_INSN_DECODE(kDisParmParseCond, 12, 4, 3 /*idxParam*/), 173 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(DataProcFpCondSelect) 174 DIS_ARMV8_OP(0x1e200c00, "fcsel", OP_ARMV8_A64_FCSEL, DISOPTYPE_HARMLESS), 175 175 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_4(DataProcFpCondSelect, 0xff200c00 /*fFixedInsn*/, 176 176 kDisArmV8OpcDecodeNop, … … 184 184 * Note: The opcode is selected based on the <opcode> field. 185 185 */ 186 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpDataProc2Src) 187 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET), 188 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 0, 5, 0 /*idxParam*/), 189 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 5, 5, 1 /*idxParam*/), 190 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 16, 5, 2 /*idxParam*/), 186 191 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(DataProcFpDataProc2Src) 187 192 DIS_ARMV8_OP(0x1e200800, "fmul", OP_ARMV8_A64_FMUL, DISOPTYPE_HARMLESS), … … 195 200 DIS_ARMV8_OP(0x1e208800, "fnmul", OP_ARMV8_A64_FNMUL, DISOPTYPE_HARMLESS), 196 201 /* Rest of the 4 bit block is invalid */ 197 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpDataProc2Src)198 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET),199 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 0, 5, 0 /*idxParam*/),200 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 5, 5, 1 /*idxParam*/),201 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 16, 5, 2 /*idxParam*/),202 202 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(DataProcFpDataProc2Src, 0xff20fc00 /*fFixedInsn*/, 203 203 kDisArmV8OpcDecodeNop, … … 213 213 * Note: The opcode is selected based on the <opcode> field. 214 214 */ 215 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpDataProc1Src) 216 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET), 217 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 0, 5, 0 /*idxParam*/), 218 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 5, 5, 1 /*idxParam*/), 219 DIS_ARMV8_INSN_DECODE(kDisParmParseFpFixupFCvt, 0, 0, DIS_ARMV8_INSN_PARAM_UNSET), 215 220 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(DataProcFpDataProc1Src) 216 221 DIS_ARMV8_OP(0x1e204000, "fmov", OP_ARMV8_A64_FMOV, DISOPTYPE_HARMLESS), … … 234 239 DIS_ARMV8_OP(0x1e294000, "frint64z", OP_ARMV8_A64_FRINT64Z, DISOPTYPE_HARMLESS), 235 240 DIS_ARMV8_OP(0x1e29c000, "frint64x", OP_ARMV8_A64_FRINT64X, DISOPTYPE_HARMLESS), 236 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpDataProc1Src)237 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET),238 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 0, 5, 0 /*idxParam*/),239 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 5, 5, 1 /*idxParam*/),240 DIS_ARMV8_INSN_DECODE(kDisParmParseFpFixupFCvt, 0, 0, DIS_ARMV8_INSN_PARAM_UNSET),241 241 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_2(DataProcFpDataProc1Src, 0xff3ffc00 /*fFixedInsn*/, 242 242 kDisArmV8OpcDecodeNop, … … 252 252 * Note: The opcode is selected based on the op2<3:4> field. 253 253 */ 254 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpCmpReg) 255 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET), 256 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 5, 5, 0 /*idxParam*/), 257 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 16, 5, 1 /*idxParam*/), 254 258 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(DataProcFpCmpReg) 255 259 DIS_ARMV8_OP(0x1e202000, "fcmp", OP_ARMV8_A64_FCMP, DISOPTYPE_HARMLESS), 256 260 DIS_ARMV8_OP(0x1e202010, "fcmpe", OP_ARMV8_A64_FCMPE, DISOPTYPE_HARMLESS), 257 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpCmpReg)258 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET),259 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 5, 5, 0 /*idxParam*/),260 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 16, 5, 1 /*idxParam*/),261 261 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_2(DataProcFpCmpReg, 0xff20fc1f /*fFixedInsn*/, 262 262 kDisArmV8OpcDecodeNop, … … 272 272 * Note: The opcode is selected based on the op2<3:4> field. 273 273 */ 274 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpCmpZero) 275 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET), 276 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 5, 5, 0 /*idxParam*/), 277 DIS_ARMV8_INSN_DECODE(kDisParmParseImmZero, 0, 0, 1 /*idxParam*/), 274 278 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(DataProcFpCmpZero) 275 279 DIS_ARMV8_OP(0x1e202008, "fcmp", OP_ARMV8_A64_FCMP, DISOPTYPE_HARMLESS), 276 280 DIS_ARMV8_OP(0x1e202018, "fcmpe", OP_ARMV8_A64_FCMPE, DISOPTYPE_HARMLESS), 277 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpCmpZero)278 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET),279 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 5, 5, 0 /*idxParam*/),280 DIS_ARMV8_INSN_DECODE(kDisParmParseImmZero, 0, 0, 1 /*idxParam*/),281 281 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_2(DataProcFpCmpZero, 0xff20fc1f /*fFixedInsn*/, 282 282 kDisArmV8OpcDecodeNop, … … 301 301 * Note: The opcode is selected based on the <op> field. 302 302 */ 303 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpImm) 304 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET), 305 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 0, 5, 0 /*idxParam*/), 306 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 13, 8, 1 /*idxParam*/), 303 307 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(DataProcFpImm) 304 308 DIS_ARMV8_OP(0x1e201000, "fmov", OP_ARMV8_A64_FMOV, DISOPTYPE_HARMLESS), 305 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpImm)306 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET),307 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 0, 5, 0 /*idxParam*/),308 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 13, 8, 1 /*idxParam*/),309 309 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_2(DataProcFpImm, 0xff201fe0 /*fFixedInsn*/, 310 310 kDisArmV8OpcDecodeNop, … … 320 320 * Note: The opcode is selected based on the <op> field. 321 321 */ 322 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(DataProcFpCondCmp)323 DIS_ARMV8_OP(0x1e200400, "fccmp", OP_ARMV8_A64_FCCMP, DISOPTYPE_HARMLESS),324 DIS_ARMV8_OP(0x1e200410, "fccmpe", OP_ARMV8_A64_FCCMPE, DISOPTYPE_HARMLESS),325 322 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpCondCmp) 326 323 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET), … … 329 326 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 0, 4, 2 /*idxParam*/), 330 327 DIS_ARMV8_INSN_DECODE(kDisParmParseCond, 12, 4, 3 /*idxParam*/), 328 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(DataProcFpCondCmp) 329 DIS_ARMV8_OP(0x1e200400, "fccmp", OP_ARMV8_A64_FCCMP, DISOPTYPE_HARMLESS), 330 DIS_ARMV8_OP(0x1e200410, "fccmpe", OP_ARMV8_A64_FCCMPE, DISOPTYPE_HARMLESS), 331 331 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_4(DataProcFpCondCmp, 0xff200c10 /*fFixedInsn*/, 332 332 kDisArmV8OpcDecodeNop, … … 437 437 * Note: The o1,o0 bitfields are concatenated to form an index. 438 438 */ 439 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpDataProc3Src) 440 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET), 441 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 0, 5, 0 /*idxParam*/), 442 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 5, 5, 1 /*idxParam*/), 443 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 16, 5, 2 /*idxParam*/), 444 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 10, 5, 3 /*idxParam*/), 439 445 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(DataProcFpDataProc3Src) 440 446 DIS_ARMV8_OP(0x1f000000, "fmadd", OP_ARMV8_A64_FMADD, DISOPTYPE_HARMLESS), … … 442 448 DIS_ARMV8_OP(0x1f200000, "fnmadd", OP_ARMV8_A64_FNMADD, DISOPTYPE_HARMLESS), 443 449 DIS_ARMV8_OP(0x1f208000, "fnmsub", OP_ARMV8_A64_FNMSUB, DISOPTYPE_HARMLESS), 444 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcFpDataProc3Src)445 DIS_ARMV8_INSN_DECODE(kDisParmParseFpType, 22, 2, DIS_ARMV8_INSN_PARAM_UNSET),446 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 0, 5, 0 /*idxParam*/),447 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 5, 5, 1 /*idxParam*/),448 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 16, 5, 2 /*idxParam*/),449 DIS_ARMV8_INSN_DECODE(kDisParmParseFpReg, 10, 5, 3 /*idxParam*/),450 450 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_4(DataProcFpDataProc3Src, 0xff208000 /*fFixedInsn*/, 451 451 kDisArmV8OpcDecodeCollate, … … 482 482 * Note: The U,opcode bitfields are concatenated to form an index. 483 483 */ 484 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(DataProcSimdScalarShiftByImm)485 DIS_ARMV8_OP(0x5f000400, "sshr", OP_ARMV8_A64_SSHR, DISOPTYPE_HARMLESS),486 INVALID_OPCODE,487 DIS_ARMV8_OP(0x5f001400, "ssra", OP_ARMV8_A64_SSRA, DISOPTYPE_HARMLESS),488 INVALID_OPCODE,489 DIS_ARMV8_OP(0x5f002400, "srshr", OP_ARMV8_A64_SRSHR, DISOPTYPE_HARMLESS),490 INVALID_OPCODE,491 DIS_ARMV8_OP(0x5f003400, "srsra", OP_ARMV8_A64_SRSRA, DISOPTYPE_HARMLESS),492 INVALID_OPCODE,493 INVALID_OPCODE,494 INVALID_OPCODE,495 #if 0 /** @todo */496 DIS_ARMV8_OP(0x5f005400, "shl", OP_ARMV8_A64_SHL, DISOPTYPE_HARMLESS),497 INVALID_OPCODE,498 DIS_ARMV8_OP(0x5f007400, "sqshl", OP_ARMV8_A64_SQSHL, DISOPTYPE_HARMLESS),499 INVALID_OPCODE,500 DIS_ARMV8_OP(0x5f009400, "sqshrn", OP_ARMV8_A64_SQSHRN, DISOPTYPE_HARMLESS),501 INVALID_OPCODE,502 DIS_ARMV8_OP(0x5f009c00, "sqrshrn", OP_ARMV8_A64_SQRSHRN, DISOPTYPE_HARMLESS),503 #endif504 484 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DataProcSimdScalarShiftByImm) 505 485 DIS_ARMV8_INSN_DECODE(kDisParmParseSimdRegScalar, 0, 5, 0 /*idxParam*/), 506 486 DIS_ARMV8_INSN_DECODE(kDisParmParseSimdRegScalar, 5, 5, 1 /*idxParam*/), 507 487 DIS_ARMV8_INSN_DECODE(kDisParmParseImmHImmB, 16, 7, 2 /*idxParam*/), 488 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(DataProcSimdScalarShiftByImm) 489 DIS_ARMV8_OP(0x5f000400, "sshr", OP_ARMV8_A64_SSHR, DISOPTYPE_HARMLESS), 490 INVALID_OPCODE, 491 DIS_ARMV8_OP(0x5f001400, "ssra", OP_ARMV8_A64_SSRA, DISOPTYPE_HARMLESS), 492 INVALID_OPCODE, 493 DIS_ARMV8_OP(0x5f002400, "srshr", OP_ARMV8_A64_SRSHR, DISOPTYPE_HARMLESS), 494 INVALID_OPCODE, 495 DIS_ARMV8_OP(0x5f003400, "srsra", OP_ARMV8_A64_SRSRA, DISOPTYPE_HARMLESS), 496 INVALID_OPCODE, 497 INVALID_OPCODE, 498 INVALID_OPCODE, 499 #if 0 /** @todo */ 500 DIS_ARMV8_OP(0x5f005400, "shl", OP_ARMV8_A64_SHL, DISOPTYPE_HARMLESS), 501 INVALID_OPCODE, 502 DIS_ARMV8_OP(0x5f007400, "sqshl", OP_ARMV8_A64_SQSHL, DISOPTYPE_HARMLESS), 503 INVALID_OPCODE, 504 DIS_ARMV8_OP(0x5f009400, "sqshrn", OP_ARMV8_A64_SQSHRN, DISOPTYPE_HARMLESS), 505 INVALID_OPCODE, 506 DIS_ARMV8_OP(0x5f009c00, "sqrshrn", OP_ARMV8_A64_SQRSHRN, DISOPTYPE_HARMLESS), 507 #endif 508 508 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(DataProcSimdScalarShiftByImm, 0xff80fc00 /*fFixedInsn*/, 509 509 kDisArmV8OpcDecodeCollate, -
trunk/src/VBox/Disassembler/DisasmTables-armv8-a64.cpp
r106618 r106626 40 40 41 41 #define DIS_ARMV8_OP(a_fValue, a_szOpcode, a_uOpcode, a_fOpType) \ 42 { a_fValue, 0, OP(a_szOpcode, 0, 0, 0, a_uOpcode, 0, 0, 0, a_fOpType) }42 { a_fValue, 0, NULL, OP(a_szOpcode, 0, 0, 0, a_uOpcode, 0, 0, 0, a_fOpType) } 43 43 #define DIS_ARMV8_OP_EX(a_fValue, a_szOpcode, a_uOpcode, a_fOpType, a_fFlags) \ 44 { a_fValue, a_fFlags, OP(a_szOpcode, 0, 0, 0, a_uOpcode, 0, 0, 0, a_fOpType) } 44 { a_fValue, a_fFlags, NULL, OP(a_szOpcode, 0, 0, 0, a_uOpcode, 0, 0, 0, a_fOpType) } 45 #define DIS_ARMV8_OP_ALT_DECODE(a_fValue, a_szOpcode, a_uOpcode, a_fOpType, a_aAltDecode) \ 46 { a_fValue, 0, &g_aArmV8A64Insn ## a_aAltDecode ## Decode[0], OP(a_szOpcode, 0, 0, 0, a_uOpcode, 0, 0, 0, a_fOpType) } 47 45 48 46 49 #ifndef DIS_CORE_ONLY … … 63 66 64 67 /* UDF */ 68 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(Rsvd) 69 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 0, 16, 0 /*idxParam*/), 65 70 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(Rsvd) 66 71 DIS_ARMV8_OP(0x00000000, "udf" , OP_ARMV8_A64_UDF, DISOPTYPE_INVALID) 67 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(Rsvd)68 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 0, 16, 0 /*idxParam*/),69 72 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_1(Rsvd, 0xffff0000 /*fFixedInsn*/, 70 73 kDisArmV8OpcDecodeNop, 0xffff0000, 16, … … 72 75 73 76 /* ADR/ADRP */ 77 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(Adr) 78 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 79 DIS_ARMV8_INSN_DECODE(kDisParmParseImmAdr, 0, 0, 1 /*idxParam*/), 74 80 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(Adr) 75 81 DIS_ARMV8_OP(0x10000000, "adr" , OP_ARMV8_A64_ADR, DISOPTYPE_HARMLESS), 76 82 DIS_ARMV8_OP(0x90000000, "adrp" , OP_ARMV8_A64_ADRP, DISOPTYPE_HARMLESS) 77 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(Adr)78 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/),79 DIS_ARMV8_INSN_DECODE(kDisParmParseImmAdr, 0, 0, 1 /*idxParam*/),80 83 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_2(Adr, 0x9f000000 /*fFixedInsn*/, 81 84 kDisArmV8OpcDecodeNop, RT_BIT_32(31), 31, … … 84 87 85 88 /* ADD/ADDS/SUB/SUBS - shifted immediate variant */ 86 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(AddSubImm)87 DIS_ARMV8_OP(0x11000000, "add" , OP_ARMV8_A64_ADD, DISOPTYPE_HARMLESS),88 DIS_ARMV8_OP(0x31000000, "adds" , OP_ARMV8_A64_ADDS, DISOPTYPE_HARMLESS),89 DIS_ARMV8_OP(0x51000000, "sub" , OP_ARMV8_A64_SUB, DISOPTYPE_HARMLESS),90 DIS_ARMV8_OP(0x71000000, "subs" , OP_ARMV8_A64_SUBS, DISOPTYPE_HARMLESS),91 89 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(AddSubImm) 92 90 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET), … … 95 93 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 10, 12, 2 /*idxParam*/), 96 94 DIS_ARMV8_INSN_DECODE(kDisParmParseSh12, 22, 1, 2 /*idxParam*/), 95 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(AddSubImm) 96 DIS_ARMV8_OP(0x11000000, "add" , OP_ARMV8_A64_ADD, DISOPTYPE_HARMLESS), 97 DIS_ARMV8_OP(0x31000000, "adds" , OP_ARMV8_A64_ADDS, DISOPTYPE_HARMLESS), 98 DIS_ARMV8_OP(0x51000000, "sub" , OP_ARMV8_A64_SUB, DISOPTYPE_HARMLESS), 99 DIS_ARMV8_OP(0x71000000, "subs" , OP_ARMV8_A64_SUBS, DISOPTYPE_HARMLESS), 97 100 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(AddSubImm, 0x7f800000 /*fFixedInsn*/, 98 101 kDisArmV8OpcDecodeNop, RT_BIT_32(29) | RT_BIT_32(30), 29, … … 101 104 102 105 /* ADD/ADDS/SUB/SUBS - shifted register variant */ 106 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(AddSubShiftReg) 107 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET), 108 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 109 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 5, 5, 1 /*idxParam*/), 110 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 16, 5, 2 /*idxParam*/), 111 DIS_ARMV8_INSN_DECODE(kDisParmParseShift, 22, 2, 2 /*idxParam*/), 112 DIS_ARMV8_INSN_DECODE(kDisParmParseShiftAmount, 10, 6, 2 /*idxParam*/), 103 113 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(AddSubShiftReg) 104 114 DIS_ARMV8_OP(0x0b000000, "add" , OP_ARMV8_A64_ADD, DISOPTYPE_HARMLESS), … … 106 116 DIS_ARMV8_OP(0x4b000000, "sub" , OP_ARMV8_A64_SUB, DISOPTYPE_HARMLESS), 107 117 DIS_ARMV8_OP(0x6b000000, "subs" , OP_ARMV8_A64_SUBS, DISOPTYPE_HARMLESS), 108 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(AddSubShiftReg)109 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET),110 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/),111 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 5, 5, 1 /*idxParam*/),112 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 16, 5, 2 /*idxParam*/),113 DIS_ARMV8_INSN_DECODE(kDisParmParseShift, 22, 2, 2 /*idxParam*/),114 DIS_ARMV8_INSN_DECODE(kDisParmParseShiftAmount, 10, 6, 2 /*idxParam*/),115 118 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(AddSubShiftReg, 0x7f200000 /*fFixedInsn*/, 116 119 kDisArmV8OpcDecodeNop, RT_BIT_32(29) | RT_BIT_32(30), 29, … … 119 122 120 123 /* AND/ORR/EOR/ANDS */ 124 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(LogicalImm) 125 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET), 126 DIS_ARMV8_INSN_DECODE(kDisParmParseGprSp, 0, 5, 0 /*idxParam*/), 127 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 5, 5, 1 /*idxParam*/), 128 DIS_ARMV8_INSN_DECODE(kDisParmParseImmsImmrN, 10, 13, 2 /*idxParam*/), 121 129 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(LogicalImm) 122 130 DIS_ARMV8_OP(0x12000000, "and" , OP_ARMV8_A64_AND, DISOPTYPE_HARMLESS), … … 124 132 DIS_ARMV8_OP(0x52000000, "eor" , OP_ARMV8_A64_EOR, DISOPTYPE_HARMLESS), 125 133 DIS_ARMV8_OP(0x72000000, "ands" , OP_ARMV8_A64_ANDS, DISOPTYPE_HARMLESS), 126 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(LogicalImm)127 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET),128 DIS_ARMV8_INSN_DECODE(kDisParmParseGprSp, 0, 5, 0 /*idxParam*/),129 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 5, 5, 1 /*idxParam*/),130 DIS_ARMV8_INSN_DECODE(kDisParmParseImmsImmrN, 10, 13, 2 /*idxParam*/),131 134 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(LogicalImm, 0x7f800000 /*fFixedInsn*/, 132 135 kDisArmV8OpcDecodeNop, RT_BIT_32(29) | RT_BIT_32(30), 29, … … 135 138 136 139 /* MOVN/MOVZ/MOVK */ 140 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(MoveWide) 141 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET), 142 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 143 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 5, 16, 1 /*idxParam*/), 144 DIS_ARMV8_INSN_DECODE(kDisParmParseHw, 21, 2, 1 /*idxParam*/), 137 145 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(MoveWide) 138 146 DIS_ARMV8_OP(0x12800000, "movn", OP_ARMV8_A64_MOVN, DISOPTYPE_HARMLESS), … … 140 148 DIS_ARMV8_OP(0x52800000, "movz" , OP_ARMV8_A64_MOVZ, DISOPTYPE_HARMLESS), 141 149 DIS_ARMV8_OP(0x72800000, "movk" , OP_ARMV8_A64_MOVK, DISOPTYPE_HARMLESS), 142 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(MoveWide)143 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET),144 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/),145 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 5, 16, 1 /*idxParam*/),146 DIS_ARMV8_INSN_DECODE(kDisParmParseHw, 21, 2, 1 /*idxParam*/),147 150 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_2(MoveWide, 0x7f800000 /*fFixedInsn*/, 148 151 kDisArmV8OpcDecodeNop, RT_BIT_32(29) | RT_BIT_32(30), 29, … … 151 154 152 155 /* SBFM/BFM/UBFM */ 156 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(Bitfield) 157 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET), 158 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 159 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 5, 5, 1 /*idxParam*/), 160 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 16, 6, 2 /*idxParam*/), 161 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 10, 6, 3 /*idxParam*/), 153 162 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(Bitfield) 154 163 DIS_ARMV8_OP(0x13000000, "sbfm", OP_ARMV8_A64_SBFM, DISOPTYPE_HARMLESS), … … 156 165 DIS_ARMV8_OP(0x53000000, "ubfm", OP_ARMV8_A64_UBFM, DISOPTYPE_HARMLESS), 157 166 INVALID_OPCODE, 158 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(Bitfield)159 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET),160 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/),161 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 5, 5, 1 /*idxParam*/),162 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 16, 6, 2 /*idxParam*/),163 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 10, 6, 3 /*idxParam*/),164 167 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_4(Bitfield, 0x7f800000 /*fFixedInsn*/, 165 168 kDisArmV8OpcDecodeNop, RT_BIT_32(29) | RT_BIT_32(30), 29, … … 194 197 195 198 /* B.cond/BC.cond */ 199 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(CondBr) 200 DIS_ARMV8_INSN_DECODE(kDisParmParseCond, 0, 4, DIS_ARMV8_INSN_PARAM_UNSET), 201 DIS_ARMV8_INSN_DECODE(kDisParmParseImmRel, 5, 19, 0 /*idxParam*/), 196 202 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(CondBr) 197 203 DIS_ARMV8_OP(0x54000000, "b", OP_ARMV8_A64_B, DISOPTYPE_HARMLESS | DISOPTYPE_CONTROLFLOW | DISOPTYPE_RELATIVE_CONTROLFLOW | DISOPTYPE_COND_CONTROLFLOW), 198 204 DIS_ARMV8_OP(0x54000010, "bc" , OP_ARMV8_A64_BC, DISOPTYPE_HARMLESS | DISOPTYPE_CONTROLFLOW | DISOPTYPE_RELATIVE_CONTROLFLOW | DISOPTYPE_COND_CONTROLFLOW), 199 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(CondBr)200 DIS_ARMV8_INSN_DECODE(kDisParmParseCond, 0, 4, DIS_ARMV8_INSN_PARAM_UNSET),201 DIS_ARMV8_INSN_DECODE(kDisParmParseImmRel, 5, 19, 0 /*idxParam*/),202 205 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_1(CondBr, 0xff000010 /*fFixedInsn*/, 203 206 kDisArmV8OpcDecodeNop, RT_BIT_32(4), 4, … … 206 209 207 210 /* SVC/HVC/SMC/BRK/HLT/TCANCEL/DCPS1/DCPS2/DCPS3 */ 211 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(Excp) 212 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 5, 16, 0 /*idxParam*/), 208 213 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(Excp) 209 214 DIS_ARMV8_OP(0xd4000001, "svc", OP_ARMV8_A64_SVC, DISOPTYPE_CONTROLFLOW | DISOPTYPE_INTERRUPT), … … 216 221 DIS_ARMV8_OP(0xd4a00002, "dcps2", OP_ARMV8_A64_DCPS2, DISOPTYPE_CONTROLFLOW | DISOPTYPE_INTERRUPT), 217 222 DIS_ARMV8_OP(0xd4a00003, "dcps3", OP_ARMV8_A64_DCPS3, DISOPTYPE_CONTROLFLOW | DISOPTYPE_INTERRUPT), 218 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(Excp)219 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 5, 16, 0 /*idxParam*/),220 223 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_1(Excp, 0xffe0001f /*fFixedInsn*/, 221 224 kDisArmV8OpcDecodeLookup, 0xffe0001f, 0, … … 224 227 225 228 /* WFET/WFIT */ 229 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(SysReg) 230 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 226 231 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(SysReg) 227 232 DIS_ARMV8_OP(0xd5031000, "wfet", OP_ARMV8_A64_WFET, DISOPTYPE_HARMLESS), /* FEAT_WFxT */ 228 233 DIS_ARMV8_OP(0x54000010, "wfit" , OP_ARMV8_A64_WFIT, DISOPTYPE_HARMLESS), /* FEAT_WFxT */ 229 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(SysReg)230 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/),231 234 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_1(SysReg, 0xffffffe0 /*fFixedInsn*/, 232 235 kDisArmV8OpcDecodeNop, 0xfe0, 5, … … 235 238 236 239 /* Various hint instructions */ 240 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(Hints) 237 241 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(Hints) 238 242 DIS_ARMV8_OP(0xd503201f, "nop", OP_ARMV8_A64_NOP, DISOPTYPE_HARMLESS), … … 245 249 DIS_ARMV8_OP(0xd50320ff, "xpaclri", OP_ARMV8_A64_XPACLRI, DISOPTYPE_HARMLESS), /* FEAT_PAuth */ 246 250 /** @todo */ 247 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(Hints)248 251 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_0(Hints, 0xffffffff /*fFixedInsn*/, 249 252 kDisArmV8OpcDecodeNop, 0xfe0, 5); … … 251 254 252 255 /* CLREX */ 256 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DecBarriers) 257 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 8, 4, 0 /*idxParam*/), 253 258 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(DecBarriers) 254 259 INVALID_OPCODE, … … 258 263 DIS_ARMV8_OP(0xD503309f, "dsb", OP_ARMV8_A64_DSB, DISOPTYPE_HARMLESS), 259 264 DIS_ARMV8_OP(0xd50330bf, "dmb", OP_ARMV8_A64_DMB, DISOPTYPE_HARMLESS), 260 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(DecBarriers)261 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 8, 4, 0 /*idxParam*/),262 265 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_1(DecBarriers, 0xfffff0ff /*fFixedInsn*/, 263 266 kDisArmV8OpcDecodeNop, RT_BIT_32(5) | RT_BIT_32(6) | RT_BIT_32(7), 5, … … 279 282 280 283 /* MSR (and potentially CFINV,XAFLAG,AXFLAG) */ 281 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(PState)282 DIS_ARMV8_OP(0xd500401f, "msr", OP_ARMV8_A64_MSR, DISOPTYPE_HARMLESS),283 284 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(PState) 284 285 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 8, 4, 1 /*idxParam*/), /* CRm field encodes the immediate value, gets validated by the next decoder stage. */ 285 286 DIS_ARMV8_INSN_DECODE(kDisParmParsePState, 0, 0, 0 /*idxParam*/), /* This is special for the MSR instruction. */ 287 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(PState) 288 DIS_ARMV8_OP(0xd500401f, "msr", OP_ARMV8_A64_MSR, DISOPTYPE_HARMLESS), 286 289 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_2(PState, 0xfff8f01f /*fFixedInsn*/, 287 290 kDisArmV8OpcDecodeNop, 0, 0, … … 290 293 291 294 /* TSTART/TTEST */ 295 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(SysResult) 296 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 292 297 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(SysResult) 293 298 DIS_ARMV8_OP(0xd5233060, "tstart", OP_ARMV8_A64_TSTART, DISOPTYPE_HARMLESS | DISOPTYPE_PRIVILEGED), /* FEAT_TME */ 294 299 DIS_ARMV8_OP(0xd5233160, "ttest", OP_ARMV8_A64_TTEST, DISOPTYPE_HARMLESS), /* FEAT_TME */ 295 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(SysResult)296 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/),297 300 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_1(SysResult, 0xfffffffe /*fFixedInsn*/, 298 301 kDisArmV8OpcDecodeNop, RT_BIT_32(8) | RT_BIT_32(9) | RT_BIT_32(10) | RT_BIT_32(11), 8, … … 301 304 302 305 /* SYS */ 303 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(Sys)304 DIS_ARMV8_OP(0xd5080000, "sys", OP_ARMV8_A64_SYS, DISOPTYPE_HARMLESS),305 306 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(Sys) 306 307 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 16, 3, 0 /*idxParam*/), … … 308 309 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 5, 3, 2 /*idxParam*/), 309 310 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 3 /*idxParam*/), 311 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(Sys) 312 DIS_ARMV8_OP(0xd5080000, "sys", OP_ARMV8_A64_SYS, DISOPTYPE_HARMLESS), 310 313 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_0(Sys, 0xfff80000 /*fFixedInsn*/, 311 314 kDisArmV8OpcDecodeNop, 0, 0); /** @todo */ … … 313 316 314 317 /* SYSL */ 315 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(SysL)316 DIS_ARMV8_OP(0xd5280000, "sysl", OP_ARMV8_A64_SYSL, DISOPTYPE_HARMLESS),317 318 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(SysL) 318 319 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), … … 320 321 DIS_ARMV8_INSN_DECODE(kDisParmParseCRnCRm, 8, 8, 2 /*idxParam*/), 321 322 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 5, 3, 3 /*idxParam*/), 323 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(SysL) 324 DIS_ARMV8_OP(0xd5280000, "sysl", OP_ARMV8_A64_SYSL, DISOPTYPE_HARMLESS), 322 325 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_0(SysL, 0xfff80000 /*fFixedInsn*/, 323 326 kDisArmV8OpcDecodeNop, 0, 0); /** @todo */ … … 325 328 326 329 /* MSR */ 327 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(Msr)328 DIS_ARMV8_OP(0xd5100000, "msr", OP_ARMV8_A64_MSR, DISOPTYPE_HARMLESS | DISOPTYPE_PRIVILEGED),329 330 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(Msr) 330 331 DIS_ARMV8_INSN_DECODE(kDisParmParseSysReg, 5, 15, 0 /*idxParam*/), 331 332 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 1 /*idxParam*/), 333 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(Msr) 334 DIS_ARMV8_OP(0xd5100000, "msr", OP_ARMV8_A64_MSR, DISOPTYPE_HARMLESS | DISOPTYPE_PRIVILEGED), 332 335 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_2(Msr, 0xfff00000 /*fFixedInsn*/, 333 336 kDisArmV8OpcDecodeNop, 0, 0, … … 336 339 337 340 /* MRS */ 341 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(Mrs) 342 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 343 DIS_ARMV8_INSN_DECODE(kDisParmParseSysReg, 5, 15, 1 /*idxParam*/), 338 344 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(Mrs) 339 345 DIS_ARMV8_OP(0xd5300000, "mrs", OP_ARMV8_A64_MRS, DISOPTYPE_HARMLESS | DISOPTYPE_PRIVILEGED), 340 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(Mrs)341 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/),342 DIS_ARMV8_INSN_DECODE(kDisParmParseSysReg, 5, 15, 1 /*idxParam*/),343 346 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_2(Mrs, 0xfff00000 /*fFixedInsn*/, 344 347 kDisArmV8OpcDecodeNop, 0, 0, … … 347 350 348 351 /* BR/BRAA/BRAAZ/BRAB/BRABZ/BLR/BLRAA/BLRAAZ/BLRAB/BLRABZ/RET/RETAA/RETAB */ 352 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(BrBlrRet) 353 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 5, 5, 0 /*idxParam*/), 349 354 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(BrBlrRet) 350 355 DIS_ARMV8_OP(0xd61f0000, "br", OP_ARMV8_A64_BR, DISOPTYPE_HARMLESS | DISOPTYPE_CONTROLFLOW), … … 354 359 DIS_ARMV8_OP(0xd65f0800, "retaa", OP_ARMV8_A64_RETAA, DISOPTYPE_HARMLESS | DISOPTYPE_CONTROLFLOW), 355 360 DIS_ARMV8_OP(0xd65f0c00, "retab", OP_ARMV8_A64_RETAB, DISOPTYPE_HARMLESS | DISOPTYPE_CONTROLFLOW), 356 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(BrBlrRet)357 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 5, 5, 0 /*idxParam*/),358 361 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_1(BrBlrRet, 0xfffffc1f /*fFixedInsn*/, 359 362 kDisArmV8OpcDecodeLookup, 0xfffffc1f, 0, … … 383 386 384 387 /* B/BL */ 388 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(UncondBrImm) 389 DIS_ARMV8_INSN_DECODE(kDisParmParseImmRel, 0, 26, 0 /*idxParam*/), 385 390 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(UncondBrImm) 386 391 DIS_ARMV8_OP(0x14000000, "b", OP_ARMV8_A64_B, DISOPTYPE_HARMLESS | DISOPTYPE_CONTROLFLOW), 387 392 DIS_ARMV8_OP(0x94000000, "bl", OP_ARMV8_A64_BL, DISOPTYPE_HARMLESS | DISOPTYPE_CONTROLFLOW), 388 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(UncondBrImm)389 DIS_ARMV8_INSN_DECODE(kDisParmParseImmRel, 0, 26, 0 /*idxParam*/),390 393 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_1(UncondBrImm, 0xfc000000 /*fFixedInsn*/, 391 394 kDisArmV8OpcDecodeNop, RT_BIT_32(31), 31, … … 394 397 395 398 /* CBZ/CBNZ */ 399 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(CmpBrImm) 400 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET), 401 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 402 DIS_ARMV8_INSN_DECODE(kDisParmParseImmRel, 5, 19, 1 /*idxParam*/), 396 403 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(CmpBrImm) 397 404 DIS_ARMV8_OP(0x34000000, "cbz", OP_ARMV8_A64_CBZ, DISOPTYPE_HARMLESS | DISOPTYPE_CONTROLFLOW), 398 405 DIS_ARMV8_OP(0x35000000, "cbnz", OP_ARMV8_A64_CBNZ, DISOPTYPE_HARMLESS | DISOPTYPE_CONTROLFLOW), 399 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(CmpBrImm)400 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET),401 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/),402 DIS_ARMV8_INSN_DECODE(kDisParmParseImmRel, 5, 19, 1 /*idxParam*/),403 406 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_2(CmpBrImm, 0x7f000000 /*fFixedInsn*/, 404 407 kDisArmV8OpcDecodeNop, RT_BIT_32(24), 24, … … 407 410 408 411 /* TBZ/TBNZ */ 412 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(TestBrImm) 413 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET), /* Not an SF bit but has the same meaning. */ 414 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 415 DIS_ARMV8_INSN_DECODE(kDisParmParseImmTbz, 0, 0, 1 /*idxParam*/), /* Hardcoded bit offsets in parser. */ 416 DIS_ARMV8_INSN_DECODE(kDisParmParseImmRel, 5, 14, 2 /*idxParam*/), 409 417 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(TestBrImm) 410 418 DIS_ARMV8_OP(0x36000000, "tbz", OP_ARMV8_A64_TBZ, DISOPTYPE_HARMLESS | DISOPTYPE_CONTROLFLOW), 411 419 DIS_ARMV8_OP(0x37000000, "tbnz", OP_ARMV8_A64_TBNZ, DISOPTYPE_HARMLESS | DISOPTYPE_CONTROLFLOW), 412 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(TestBrImm)413 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET), /* Not an SF bit but has the same meaning. */414 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/),415 DIS_ARMV8_INSN_DECODE(kDisParmParseImmTbz, 0, 0, 1 /*idxParam*/), /* Hardcoded bit offsets in parser. */416 DIS_ARMV8_INSN_DECODE(kDisParmParseImmRel, 5, 14, 2 /*idxParam*/),417 420 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(TestBrImm, 0x7f000000 /*fFixedInsn*/, 418 421 kDisArmV8OpcDecodeNop, RT_BIT_32(24), 24, … … 440 443 441 444 /* AND/ORR/EOR/ANDS */ 445 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(LogShiftRegN0) 446 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET), 447 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 448 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 5, 5, 1 /*idxParam*/), 449 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 16, 5, 2 /*idxParam*/), 450 DIS_ARMV8_INSN_DECODE(kDisParmParseShift, 22, 2, 2 /*idxParam*/), 451 DIS_ARMV8_INSN_DECODE(kDisParmParseShiftAmount, 10, 6, 2 /*idxParam*/), 442 452 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(LogShiftRegN0) 443 453 DIS_ARMV8_OP(0x0a000000, "and", OP_ARMV8_A64_AND, DISOPTYPE_HARMLESS), … … 445 455 DIS_ARMV8_OP(0x4a000000, "eor", OP_ARMV8_A64_EOR, DISOPTYPE_HARMLESS), 446 456 DIS_ARMV8_OP(0x6a000000, "ands", OP_ARMV8_A64_ANDS, DISOPTYPE_HARMLESS) 447 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(LogShiftRegN0) 457 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(LogShiftRegN0, 0x7f200000 /*fFixedInsn*/, 458 kDisArmV8OpcDecodeNop, RT_BIT_32(29) | RT_BIT_32(30), 29, 459 kDisArmv8OpParmReg, kDisArmv8OpParmReg, kDisArmv8OpParmReg); 460 461 462 /* AND/ORR/EOR/ANDS */ 463 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(LogShiftRegN1) 448 464 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET), 449 465 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), … … 452 468 DIS_ARMV8_INSN_DECODE(kDisParmParseShift, 22, 2, 2 /*idxParam*/), 453 469 DIS_ARMV8_INSN_DECODE(kDisParmParseShiftAmount, 10, 6, 2 /*idxParam*/), 454 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(LogShiftRegN0, 0x7f200000 /*fFixedInsn*/,455 kDisArmV8OpcDecodeNop, RT_BIT_32(29) | RT_BIT_32(30), 29,456 kDisArmv8OpParmReg, kDisArmv8OpParmReg, kDisArmv8OpParmReg);457 458 459 /* AND/ORR/EOR/ANDS */460 470 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(LogShiftRegN1) 461 471 DIS_ARMV8_OP(0x0a200000, "bic", OP_ARMV8_A64_BIC, DISOPTYPE_HARMLESS), … … 463 473 DIS_ARMV8_OP(0x4a200000, "eon", OP_ARMV8_A64_EON, DISOPTYPE_HARMLESS), 464 474 DIS_ARMV8_OP(0x6a200000, "bics", OP_ARMV8_A64_BICS, DISOPTYPE_HARMLESS) 465 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(LogShiftRegN1)466 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET),467 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/),468 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 5, 5, 1 /*idxParam*/),469 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 16, 5, 2 /*idxParam*/),470 DIS_ARMV8_INSN_DECODE(kDisParmParseShift, 22, 2, 2 /*idxParam*/),471 DIS_ARMV8_INSN_DECODE(kDisParmParseShiftAmount, 10, 6, 2 /*idxParam*/),472 475 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(LogShiftRegN1, 0x7f200000 /*fFixedInsn*/, 473 476 kDisArmV8OpcDecodeNop, RT_BIT_32(29) | RT_BIT_32(30), 29, … … 499 502 500 503 /* CCMN/CCMP */ 501 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(CondCmpReg)502 DIS_ARMV8_OP(0x3a400000, "ccmn", OP_ARMV8_A64_CCMN, DISOPTYPE_HARMLESS),503 DIS_ARMV8_OP(0x7a400000, "ccmp", OP_ARMV8_A64_CCMP, DISOPTYPE_HARMLESS)504 504 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(CondCmpReg) 505 505 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET), … … 508 508 DIS_ARMV8_INSN_DECODE(kDisParmParseImm, 0, 4, 2 /*idxParam*/), 509 509 DIS_ARMV8_INSN_DECODE(kDisParmParseCond, 12, 4, 3 /*idxParam*/), 510 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(CondCmpReg) 511 DIS_ARMV8_OP(0x3a400000, "ccmn", OP_ARMV8_A64_CCMN, DISOPTYPE_HARMLESS), 512 DIS_ARMV8_OP(0x7a400000, "ccmp", OP_ARMV8_A64_CCMP, DISOPTYPE_HARMLESS) 510 513 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_4(CondCmpReg, 0x7fe00c10 /*fFixedInsn*/, 511 514 kDisArmV8OpcDecodeNop, RT_BIT_32(30), 30, … … 523 526 DIS_ARMV8_DECODE_MAP_INVALID_ENTRY, /** @todo Conditional compare immediate */ 524 527 DIS_ARMV8_DECODE_MAP_DEFINE_END(CondCmp, RT_BIT_32(11), 11); 528 529 530 /* UDIV/SDIV/LSLV/LSRV/ASRV/RORV/CRC32.../SMAX/UMAX/SMIN/UMIN */ 531 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(Reg2Src32Bit) 532 DIS_ARMV8_INSN_DECODE(kDisParmParseSf, 31, 1, DIS_ARMV8_INSN_PARAM_UNSET), 533 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 534 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 5, 5, 1 /*idxParam*/), 535 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 16, 5, 2 /*idxParam*/), 536 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(Reg2Src32Bit) 537 INVALID_OPCODE, 538 INVALID_OPCODE, 539 DIS_ARMV8_OP(0x1ac00800, "udiv", OP_ARMV8_A64_UDIV, DISOPTYPE_HARMLESS), 540 DIS_ARMV8_OP(0x1ac00c00, "sdiv", OP_ARMV8_A64_SDIV, DISOPTYPE_HARMLESS), 541 INVALID_OPCODE, 542 INVALID_OPCODE, 543 INVALID_OPCODE, 544 INVALID_OPCODE, 545 DIS_ARMV8_OP(0x1ac02000, "lslv", OP_ARMV8_A64_LSLV, DISOPTYPE_HARMLESS), 546 DIS_ARMV8_OP(0x1ac02400, "lsrv", OP_ARMV8_A64_LSRV, DISOPTYPE_HARMLESS), 547 DIS_ARMV8_OP(0x1ac02800, "asrv", OP_ARMV8_A64_ASRV, DISOPTYPE_HARMLESS), 548 DIS_ARMV8_OP(0x1ac02c00, "rorv", OP_ARMV8_A64_RORV, DISOPTYPE_HARMLESS), 549 INVALID_OPCODE, 550 INVALID_OPCODE, 551 INVALID_OPCODE, 552 INVALID_OPCODE, 553 DIS_ARMV8_OP(0x1ac04000, "crc32b", OP_ARMV8_A64_CRC32B, DISOPTYPE_HARMLESS), 554 DIS_ARMV8_OP(0x1ac04400, "crc32h", OP_ARMV8_A64_CRC32H, DISOPTYPE_HARMLESS), 555 DIS_ARMV8_OP(0x1ac04800, "crc32w", OP_ARMV8_A64_CRC32W, DISOPTYPE_HARMLESS), 556 INVALID_OPCODE, 557 DIS_ARMV8_OP(0x1ac05000, "crc32cb", OP_ARMV8_A64_CRC32CB, DISOPTYPE_HARMLESS), 558 DIS_ARMV8_OP(0x1ac05400, "crc32ch", OP_ARMV8_A64_CRC32CH, DISOPTYPE_HARMLESS), 559 DIS_ARMV8_OP(0x1ac05800, "crc32cw", OP_ARMV8_A64_CRC32CW, DISOPTYPE_HARMLESS), 560 INVALID_OPCODE, 561 DIS_ARMV8_OP(0x1ac06000, "smax", OP_ARMV8_A64_SMAX, DISOPTYPE_HARMLESS), 562 DIS_ARMV8_OP(0x1ac06400, "umax", OP_ARMV8_A64_UMAX, DISOPTYPE_HARMLESS), 563 DIS_ARMV8_OP(0x1ac06800, "smin", OP_ARMV8_A64_SMIN, DISOPTYPE_HARMLESS), 564 DIS_ARMV8_OP(0x1ac06c00, "umin", OP_ARMV8_A64_UMIN, DISOPTYPE_HARMLESS), 565 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(Reg2Src32Bit, 0xffe0fc00 /*fFixedInsn*/, kDisArmV8OpcDecodeNop, 566 RT_BIT_32(10) | RT_BIT_32(11) | RT_BIT_32(12) | RT_BIT_32(13) | RT_BIT_32(14) | RT_BIT_32(14), 10, 567 kDisArmv8OpParmReg, kDisArmv8OpParmReg, kDisArmv8OpParmReg); 568 569 570 /* UDIV/SDIV/LSLV/LSRV/ASRV/RORV/CRC32.../SMAX/UMAX/SMIN/UMIN */ 571 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(Reg2Src64Bit) 572 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 573 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 5, 5, 1 /*idxParam*/), 574 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 16, 5, 2 /*idxParam*/), 575 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER_ALTERNATIVE(Reg2SrcCrc32X) 576 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr32, 0, 5, 0 /*idxParam*/), 577 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr32, 5, 5, 1 /*idxParam*/), 578 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr64, 16, 5, 2 /*idxParam*/), 579 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(Reg2Src64Bit) 580 INVALID_OPCODE, /** @todo SUBP (FEAT_MTE). */ 581 INVALID_OPCODE, 582 DIS_ARMV8_OP( 0x9ac00800, "udiv", OP_ARMV8_A64_UDIV, DISOPTYPE_HARMLESS), 583 DIS_ARMV8_OP( 0x9ac00c00, "sdiv", OP_ARMV8_A64_SDIV, DISOPTYPE_HARMLESS), 584 INVALID_OPCODE, /** @todo IRG (FEAT_MTE). */ 585 INVALID_OPCODE, /** @todo GMI (FEAT_MTE). */ 586 INVALID_OPCODE, 587 INVALID_OPCODE, 588 DIS_ARMV8_OP( 0x9ac02000, "lslv", OP_ARMV8_A64_LSLV, DISOPTYPE_HARMLESS), 589 DIS_ARMV8_OP( 0x9ac02400, "lsrv", OP_ARMV8_A64_LSRV, DISOPTYPE_HARMLESS), 590 DIS_ARMV8_OP( 0x9ac02800, "asrv", OP_ARMV8_A64_ASRV, DISOPTYPE_HARMLESS), 591 DIS_ARMV8_OP( 0x9ac02c00, "rorv", OP_ARMV8_A64_RORV, DISOPTYPE_HARMLESS), 592 INVALID_OPCODE, /** @todo PACGA (FEAT_PAuth). */ 593 INVALID_OPCODE, 594 INVALID_OPCODE, 595 INVALID_OPCODE, 596 INVALID_OPCODE, 597 INVALID_OPCODE, 598 INVALID_OPCODE, 599 DIS_ARMV8_OP_ALT_DECODE(0x9ac04c00, "crc32x", OP_ARMV8_A64_CRC32X, DISOPTYPE_HARMLESS, Reg2SrcCrc32X), 600 INVALID_OPCODE, 601 INVALID_OPCODE, 602 INVALID_OPCODE, 603 DIS_ARMV8_OP_ALT_DECODE(0x9ac05c00, "crc32cx", OP_ARMV8_A64_CRC32CX, DISOPTYPE_HARMLESS, Reg2SrcCrc32X), 604 DIS_ARMV8_OP( 0x9ac06000, "smax", OP_ARMV8_A64_SMAX, DISOPTYPE_HARMLESS), 605 DIS_ARMV8_OP( 0x9ac06400, "umax", OP_ARMV8_A64_UMAX, DISOPTYPE_HARMLESS), 606 DIS_ARMV8_OP( 0x9ac06800, "smin", OP_ARMV8_A64_SMIN, DISOPTYPE_HARMLESS), 607 DIS_ARMV8_OP( 0x9ac06c00, "umin", OP_ARMV8_A64_UMIN, DISOPTYPE_HARMLESS) 608 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(Reg2Src64Bit, 0xffe0fc00 /*fFixedInsn*/, kDisArmV8OpcDecodeNop, 609 RT_BIT_32(10) | RT_BIT_32(11) | RT_BIT_32(12) | RT_BIT_32(13) | RT_BIT_32(14) | RT_BIT_32(14), 10, 610 kDisArmv8OpParmReg, kDisArmv8OpParmReg, kDisArmv8OpParmReg); 611 612 613 /* SUBPS */ 614 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(Subps) 615 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 616 DIS_ARMV8_INSN_DECODE(kDisParmParseGprSp, 5, 5, 1 /*idxParam*/), 617 DIS_ARMV8_INSN_DECODE(kDisParmParseGprSp, 16, 5, 2 /*idxParam*/), 618 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(Subps) 619 DIS_ARMV8_OP(0xbac00000, "subps", OP_ARMV8_A64_SUBPS, DISOPTYPE_HARMLESS), 620 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(Subps, 0xffe0fc00 /*fFixedInsn*/, kDisArmV8OpcDecodeNop, 621 RT_BIT_32(10) | RT_BIT_32(11) | RT_BIT_32(12) | RT_BIT_32(13) | RT_BIT_32(14) | RT_BIT_32(14), 10, 622 kDisArmv8OpParmReg, kDisArmv8OpParmReg, kDisArmv8OpParmReg); 623 624 625 /** 626 * C4.1.95 - Data Processing - Register - 2-source 627 * 628 * Differentiate between 32-bit and 64-bit groups based on the SF bit. 629 * Not done as a general decoder step because there are different instructions in each group. 630 */ 631 DIS_ARMV8_DECODE_MAP_DEFINE_BEGIN(Reg2Src) 632 DIS_ARMV8_DECODE_MAP_ENTRY(Reg2Src32Bit), /* Data-processing (2-source, 32-bit) */ 633 DIS_ARMV8_DECODE_MAP_ENTRY(Reg2Src64Bit), /* Data-processing (2-source, 64-bit) */ 634 DIS_ARMV8_DECODE_MAP_DEFINE_END_SINGLE_BIT(Reg2Src, 31); 635 636 637 /** 638 * C4.1.95 - Data Processing - Register - 2-source 639 * 640 * Differentiate between SUBPS and the rest based on the S bit. 641 */ 642 DIS_ARMV8_DECODE_MAP_DEFINE_BEGIN(Reg2SrcSubps) 643 DIS_ARMV8_DECODE_MAP_ENTRY(Reg2Src), /* Data-processing (2-source) */ 644 DIS_ARMV8_DECODE_MAP_ENTRY(Subps), /* Subps */ 645 DIS_ARMV8_DECODE_MAP_DEFINE_END_SINGLE_BIT(Reg2SrcSubps, 29); 646 647 648 /** 649 * C4.1.95 - Data Processing - Register - 2-source / 1-source 650 * 651 * The 2-source and 1-source instruction classes differentiate based on bit 30. 652 */ 653 DIS_ARMV8_DECODE_MAP_DEFINE_BEGIN(Reg2Src1Src) 654 DIS_ARMV8_DECODE_MAP_ENTRY(Reg2SrcSubps), /* Data-processing (2-source) */ 655 DIS_ARMV8_DECODE_MAP_INVALID_ENTRY, /** @todo Data-processing (1-source) */ 656 DIS_ARMV8_DECODE_MAP_DEFINE_END_SINGLE_BIT(Reg2Src1Src, 30); 525 657 526 658 … … 546 678 DIS_ARMV8_DECODE_MAP_INVALID_ENTRY, /** @todo Add/subtract with carry. */ 547 679 DIS_ARMV8_DECODE_MAP_INVALID_ENTRY, 548 DIS_ARMV8_DECODE_MAP_ENTRY(CondCmp), /** @todo Conditional compare. */680 DIS_ARMV8_DECODE_MAP_ENTRY(CondCmp), 549 681 DIS_ARMV8_DECODE_MAP_INVALID_ENTRY, 550 682 DIS_ARMV8_DECODE_MAP_INVALID_ENTRY, /** @todo Conditional select. */ 551 683 DIS_ARMV8_DECODE_MAP_INVALID_ENTRY, 552 DIS_ARMV8_DECODE_MAP_ INVALID_ENTRY, /** @todo Data Processing 2-source/1-source. */684 DIS_ARMV8_DECODE_MAP_ENTRY(Reg2Src1Src), 553 685 DIS_ARMV8_DECODE_MAP_INVALID_ENTRY, 554 686 DIS_ARMV8_DECODE_MAP_INVALID_ENTRY, /** @todo Data Processing 3-source. */ … … 567 699 * Note: The size,opc bitfields are concatenated to form an index. 568 700 */ 701 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(LdStRegUImmGpr) 702 DIS_ARMV8_INSN_DECODE(kDisParmParseSize, 30, 2, DIS_ARMV8_INSN_PARAM_UNSET), 703 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 704 DIS_ARMV8_INSN_DECODE(kDisParmParseGprSp, 5, 5, 1 /*idxParam*/), 705 DIS_ARMV8_INSN_DECODE(kDisParmParseImmMemOff, 10, 12, 1 /*idxParam*/), 569 706 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(LdStRegUImmGpr) 570 707 DIS_ARMV8_OP(0x39000000, "strb", OP_ARMV8_A64_STRB, DISOPTYPE_HARMLESS), … … 584 721 INVALID_OPCODE, /** @todo PRFM */ 585 722 INVALID_OPCODE, 586 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(LdStRegUImmGpr)587 DIS_ARMV8_INSN_DECODE(kDisParmParseSize, 30, 2, DIS_ARMV8_INSN_PARAM_UNSET),588 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/),589 DIS_ARMV8_INSN_DECODE(kDisParmParseGprSp, 5, 5, 1 /*idxParam*/),590 DIS_ARMV8_INSN_DECODE(kDisParmParseImmMemOff, 10, 12, 1 /*idxParam*/),591 723 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_2(LdStRegUImmGpr, 0xffc00000 /*fFixedInsn*/, 592 724 kDisArmV8OpcDecodeCollate, … … 616 748 * Note: The size,opc bitfields are concatenated to form an index. 617 749 */ 750 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(LdStRegOffGpr) 751 DIS_ARMV8_INSN_DECODE(kDisParmParseSize, 30, 2, DIS_ARMV8_INSN_PARAM_UNSET), 752 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 753 DIS_ARMV8_INSN_DECODE(kDisParmParseGprSp, 5, 5, 1 /*idxParam*/), 754 DIS_ARMV8_INSN_DECODE(kDisParmParseGprOff, 16, 5, 1 /*idxParam*/), 755 DIS_ARMV8_INSN_DECODE(kDisParmParseOption, 13, 3, 1 /*idxParam*/), 756 DIS_ARMV8_INSN_DECODE(kDisParmParseS, 12, 1, 1 /*idxParam*/), 618 757 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(LdStRegOffGpr) 619 758 DIS_ARMV8_OP(0x38200800, "strb", OP_ARMV8_A64_STRB, DISOPTYPE_HARMLESS), … … 627 766 DIS_ARMV8_OP(0xb8200800, "str", OP_ARMV8_A64_STR, DISOPTYPE_HARMLESS), 628 767 DIS_ARMV8_OP(0xb8600800, "ldr", OP_ARMV8_A64_LDR, DISOPTYPE_HARMLESS), 629 DIS_ARMV8_OP_EX(0xb8a00800, "ldrsw", OP_ARMV8_A64_LDRSW, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_64BIT ),768 DIS_ARMV8_OP_EX(0xb8a00800, "ldrsw", OP_ARMV8_A64_LDRSW, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_64BIT ), 630 769 INVALID_OPCODE, 631 770 DIS_ARMV8_OP(0xf8200800, "str", OP_ARMV8_A64_STR, DISOPTYPE_HARMLESS), … … 633 772 INVALID_OPCODE, /** @todo PRFM */ 634 773 INVALID_OPCODE, 635 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(LdStRegOffGpr)636 DIS_ARMV8_INSN_DECODE(kDisParmParseSize, 30, 2, DIS_ARMV8_INSN_PARAM_UNSET),637 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/),638 DIS_ARMV8_INSN_DECODE(kDisParmParseGprSp, 5, 5, 1 /*idxParam*/),639 DIS_ARMV8_INSN_DECODE(kDisParmParseGprOff, 16, 5, 1 /*idxParam*/),640 DIS_ARMV8_INSN_DECODE(kDisParmParseOption, 13, 3, 1 /*idxParam*/),641 DIS_ARMV8_INSN_DECODE(kDisParmParseS, 12, 1, 1 /*idxParam*/),642 774 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_2(LdStRegOffGpr, 0xffe00c00 /*fFixedInsn*/, 643 775 kDisArmV8OpcDecodeCollate, … … 687 819 * Note: The size,opc bitfields are concatenated to form an index. 688 820 */ 821 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(LdStRegUnscaledImmGpr) 822 DIS_ARMV8_INSN_DECODE(kDisParmParseSize, 30, 2, DIS_ARMV8_INSN_PARAM_UNSET), 823 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 824 DIS_ARMV8_INSN_DECODE(kDisParmParseGprSp, 5, 5, 1 /*idxParam*/), 825 DIS_ARMV8_INSN_DECODE(kDisParmParseSImmMemOffUnscaled, 12, 9, 1 /*idxParam*/), 689 826 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(LdStRegUnscaledImmGpr) 690 827 DIS_ARMV8_OP(0x38000000, "sturb", OP_ARMV8_A64_STURB, DISOPTYPE_HARMLESS), … … 704 841 INVALID_OPCODE, /** @todo PRFUM */ 705 842 INVALID_OPCODE, 706 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(LdStRegUnscaledImmGpr)707 DIS_ARMV8_INSN_DECODE(kDisParmParseSize, 30, 2, DIS_ARMV8_INSN_PARAM_UNSET),708 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/),709 DIS_ARMV8_INSN_DECODE(kDisParmParseGprSp, 5, 5, 1 /*idxParam*/),710 DIS_ARMV8_INSN_DECODE(kDisParmParseSImmMemOffUnscaled, 12, 9, 1 /*idxParam*/),711 843 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_2(LdStRegUnscaledImmGpr, 0xffe00c00 /*fFixedInsn*/, 712 844 kDisArmV8OpcDecodeCollate, … … 788 920 * Note: The opc,L bitfields are concatenated to form an index. 789 921 */ 922 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(LdStRegPairOff) 923 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), 924 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 10, 5, 1 /*idxParam*/), 925 DIS_ARMV8_INSN_DECODE(kDisParmParseGprSp, 5, 5, 2 /*idxParam*/), 926 DIS_ARMV8_INSN_DECODE(kDisParmParseSImmMemOff, 15, 7, 2 /*idxParam*/), 790 927 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(LdStRegPairOff) 791 928 DIS_ARMV8_OP_EX(0x29000000, "stp", OP_ARMV8_A64_STP, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_32BIT), … … 797 934 INVALID_OPCODE, 798 935 INVALID_OPCODE, 799 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(LdStRegPairOff)800 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/),801 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 10, 5, 1 /*idxParam*/),802 DIS_ARMV8_INSN_DECODE(kDisParmParseGprSp, 5, 5, 2 /*idxParam*/),803 DIS_ARMV8_INSN_DECODE(kDisParmParseSImmMemOff, 15, 7, 2 /*idxParam*/),804 936 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(LdStRegPairOff, 0xffc00000 /*fFixedInsn*/, 805 937 kDisArmV8OpcDecodeCollate, … … 813 945 * Note: The opc,L bitfields are concatenated to form an index. 814 946 */ 815 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(LdStRegPairPreIndex)816 DIS_ARMV8_OP_EX(0x29800000, "stp", OP_ARMV8_A64_STP, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_32BIT),817 DIS_ARMV8_OP_EX(0x29c00000, "ldp", OP_ARMV8_A64_LDP, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_32BIT),818 INVALID_OPCODE,819 INVALID_OPCODE,820 DIS_ARMV8_OP_EX(0xa9800000, "stp", OP_ARMV8_A64_STP, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_64BIT),821 DIS_ARMV8_OP_EX(0xa9c00000, "ldp", OP_ARMV8_A64_LDP, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_64BIT),822 INVALID_OPCODE,823 INVALID_OPCODE,824 947 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(LdStRegPairPreIndex) 825 948 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), … … 828 951 DIS_ARMV8_INSN_DECODE(kDisParmParseSImmMemOff, 15, 7, 2 /*idxParam*/), 829 952 DIS_ARMV8_INSN_DECODE(kDisParmParseSetPreIndexed, 0, 0, 2 /*idxParam*/), 953 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(LdStRegPairPreIndex) 954 DIS_ARMV8_OP_EX(0x29800000, "stp", OP_ARMV8_A64_STP, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_32BIT), 955 DIS_ARMV8_OP_EX(0x29c00000, "ldp", OP_ARMV8_A64_LDP, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_32BIT), 956 INVALID_OPCODE, 957 INVALID_OPCODE, 958 DIS_ARMV8_OP_EX(0xa9800000, "stp", OP_ARMV8_A64_STP, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_64BIT), 959 DIS_ARMV8_OP_EX(0xa9c00000, "ldp", OP_ARMV8_A64_LDP, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_64BIT), 960 INVALID_OPCODE, 961 INVALID_OPCODE, 830 962 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(LdStRegPairPreIndex, 0xffc00000 /*fFixedInsn*/, 831 963 kDisArmV8OpcDecodeCollate, … … 839 971 * Note: The opc,L bitfields are concatenated to form an index. 840 972 */ 841 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(LdStRegPairPostIndex)842 DIS_ARMV8_OP_EX(0x28800000, "stp", OP_ARMV8_A64_STP, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_32BIT),843 DIS_ARMV8_OP_EX(0x28c00000, "ldp", OP_ARMV8_A64_LDP, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_32BIT),844 INVALID_OPCODE,845 INVALID_OPCODE,846 DIS_ARMV8_OP_EX(0xa8800000, "stp", OP_ARMV8_A64_STP, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_64BIT),847 DIS_ARMV8_OP_EX(0xa8c00000, "ldp", OP_ARMV8_A64_LDP, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_64BIT),848 INVALID_OPCODE,849 INVALID_OPCODE,850 973 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(LdStRegPairPostIndex) 851 974 DIS_ARMV8_INSN_DECODE(kDisParmParseGprZr, 0, 5, 0 /*idxParam*/), … … 854 977 DIS_ARMV8_INSN_DECODE(kDisParmParseSImmMemOff, 15, 7, 2 /*idxParam*/), 855 978 DIS_ARMV8_INSN_DECODE(kDisParmParseSetPostIndexed, 0, 0, 2 /*idxParam*/), 979 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(LdStRegPairPostIndex) 980 DIS_ARMV8_OP_EX(0x28800000, "stp", OP_ARMV8_A64_STP, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_32BIT), 981 DIS_ARMV8_OP_EX(0x28c00000, "ldp", OP_ARMV8_A64_LDP, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_32BIT), 982 INVALID_OPCODE, 983 INVALID_OPCODE, 984 DIS_ARMV8_OP_EX(0xa8800000, "stp", OP_ARMV8_A64_STP, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_64BIT), 985 DIS_ARMV8_OP_EX(0xa8c00000, "ldp", OP_ARMV8_A64_LDP, DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_64BIT), 986 INVALID_OPCODE, 987 INVALID_OPCODE, 856 988 DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(LdStRegPairPostIndex, 0xffc00000 /*fFixedInsn*/, 857 989 kDisArmV8OpcDecodeCollate, -
trunk/src/VBox/Disassembler/testcase/tstDisasmArmv8-1-asm.S
r106616 r106626 1269 1269 dsb #0xf 1270 1270 1271 ;subps x0, x1, x3 - Requires FEAT_MTE 1272 ;subps x0, sp, sp - Requires FEAT_MTE 1273 1274 udiv w0, w1, wzr 1275 udiv x0, x1, xzr 1276 1277 sdiv w0, w1, wzr 1278 sdiv x0, x1, xzr 1279 1280 lslv w0, w1, wzr 1281 lslv x0, x1, xzr 1282 1283 lsrv w0, w1, wzr 1284 lsrv x0, x1, xzr 1285 1286 asrv w0, w1, wzr 1287 asrv x0, x1, xzr 1288 1289 rorv w0, w1, wzr 1290 rorv x0, x1, xzr 1291 1292 crc32b w0, w1, wzr 1293 crc32w w0, w1, wzr 1294 crc32h w0, w1, wzr 1295 1296 crc32cb w0, w1, wzr 1297 crc32cw w0, w1, wzr 1298 crc32ch w0, w1, wzr 1299 1300 crc32x w0, w1, x3 1301 crc32x w0, w1, xzr 1302 1303 crc32cx w0, w1, x3 1304 crc32cx w0, w1, xzr 1305 1306 ;umax w0, w1, wzr - Requires FEAT_CSSC 1307 ;umax x0, x1, xzr - Requires FEAT_CSSC 1308 1309 ;smax w0, w1, wzr - Requires FEAT_CSSC 1310 ;smax x0, x1, xzr - Requires FEAT_CSSC 1311 1312 ;umin w0, w1, wzr - Requires FEAT_CSSC 1313 ;umin x0, x1, xzr - Requires FEAT_CSSC 1314 1315 ;smin w0, w1, wzr - Requires FEAT_CSSC 1316 ;smin x0, x1, xzr - Requires FEAT_CSSC 1317 1271 1318 ; 1272 1319 ; Keep last so the testcase can catch errors in
Note:
See TracChangeset
for help on using the changeset viewer.