Changeset 106746 in vbox for trunk/src/VBox/Disassembler/DisasmCore-armv8.cpp
- Timestamp:
- Oct 28, 2024 1:14:22 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Disassembler/DisasmCore-armv8.cpp
r106744 r106746 106 106 static FNDISPARSEARMV8 disArmV8ParseFpScale; 107 107 static FNDISPARSEARMV8 disArmV8ParseFpFixupFCvt; 108 static FNDISPARSEARMV8 disArmV8ParseSimdRegSize; 109 static FNDISPARSEARMV8 disArmV8ParseSimdRegSize64; 110 static FNDISPARSEARMV8 disArmV8ParseSimdRegSize128; 108 111 static FNDISPARSEARMV8 disArmV8ParseSimdRegScalar; 109 112 static FNDISPARSEARMV8 disArmV8ParseImmHImmB; … … 161 164 disArmV8ParseFpScale, 162 165 disArmV8ParseFpFixupFCvt, 166 disArmV8ParseSimdRegSize, 167 disArmV8ParseSimdRegSize64, 168 disArmV8ParseSimdRegSize128, 163 169 disArmV8ParseSimdRegScalar, 164 170 disArmV8ParseImmHImmB, … … 664 670 case sizeof(uint32_t): pParam->armv8.u.offBase <<= 2; break; 665 671 case sizeof(uint64_t): pParam->armv8.u.offBase <<= 3; break; 672 case 16: pParam->armv8.u.offBase <<= 4; break; 666 673 default: 667 674 AssertReleaseFailed(); … … 874 881 875 882 883 static int disArmV8ParseSimdRegSize(PDISSTATE pDis, uint32_t u32Insn, PCDISARMV8OPCODE pOp, PCDISARMV8INSNCLASS pInsnClass, PDISOPPARAM pParam, PCDISARMV8INSNPARAM pInsnParm, bool *pf64Bit) 884 { 885 RT_NOREF(pOp, pInsnClass, pParam, pf64Bit); 886 887 Assert(pInsnParm->cBits == 2); 888 uint32_t u32Size = disArmV8ExtractBitVecFromInsn(u32Insn, pInsnParm->idxBitStart, pInsnParm->cBits); 889 switch (u32Size) 890 { 891 case 0: pDis->armv8.cbOperand = sizeof(uint8_t); break; 892 case 1: pDis->armv8.cbOperand = sizeof(uint16_t); break; 893 case 2: pDis->armv8.cbOperand = sizeof(uint32_t); break; 894 case 3: pDis->armv8.cbOperand = sizeof(uint64_t); break; 895 default: 896 AssertReleaseFailed(); 897 } 898 899 return VINF_SUCCESS; 900 } 901 902 903 static int disArmV8ParseSimdRegSize64(PDISSTATE pDis, uint32_t u32Insn, PCDISARMV8OPCODE pOp, PCDISARMV8INSNCLASS pInsnClass, PDISOPPARAM pParam, PCDISARMV8INSNPARAM pInsnParm, bool *pf64Bit) 904 { 905 RT_NOREF(u32Insn, pOp, pInsnClass, pParam, pInsnParm, pf64Bit); 906 907 pDis->armv8.cbOperand = sizeof(uint64_t); 908 return VINF_SUCCESS; 909 } 910 911 912 static int disArmV8ParseSimdRegSize128(PDISSTATE pDis, uint32_t u32Insn, PCDISARMV8OPCODE pOp, PCDISARMV8INSNCLASS pInsnClass, PDISOPPARAM pParam, PCDISARMV8INSNPARAM pInsnParm, bool *pf64Bit) 913 { 914 RT_NOREF(u32Insn, pOp, pInsnClass, pParam, pInsnParm, pf64Bit); 915 916 pDis->armv8.cbOperand = 16; 917 return VINF_SUCCESS; 918 } 919 920 876 921 static int disArmV8ParseSimdRegScalar(PDISSTATE pDis, uint32_t u32Insn, PCDISARMV8OPCODE pOp, PCDISARMV8INSNCLASS pInsnClass, PDISOPPARAM pParam, PCDISARMV8INSNPARAM pInsnParm, bool *pf64Bit) 877 922 { 878 923 RT_NOREF(pDis, pOp, pInsnClass, pParam, pInsnParm, pf64Bit); 879 924 925 Assert(pDis->armv8.cbOperand != 0); 880 926 Assert(pParam->armv8.enmType == kDisArmv8OpParmNone); 881 927 882 928 pParam->armv8.enmType = kDisArmv8OpParmReg; 883 929 pParam->armv8.Op.Reg.idReg = disArmV8ExtractBitVecFromInsn(u32Insn, pInsnParm->idxBitStart, pInsnParm->cBits); 884 pParam->armv8.Op.Reg.enmRegType = kDisOpParamArmV8RegType_Simd_Scalar_64Bit; 930 switch (pDis->armv8.cbOperand) 931 { 932 case sizeof(uint8_t): pParam->armv8.Op.Reg.enmRegType = kDisOpParamArmV8RegType_Simd_Scalar_8Bit; break; 933 case sizeof(uint16_t): pParam->armv8.Op.Reg.enmRegType = kDisOpParamArmV8RegType_Simd_Scalar_16Bit; break; 934 case sizeof(uint32_t): pParam->armv8.Op.Reg.enmRegType = kDisOpParamArmV8RegType_Simd_Scalar_32Bit; break; 935 case sizeof(uint64_t): pParam->armv8.Op.Reg.enmRegType = kDisOpParamArmV8RegType_Simd_Scalar_64Bit; break; 936 case 16: pParam->armv8.Op.Reg.enmRegType = kDisOpParamArmV8RegType_Simd_Scalar_128Bit; break; 937 } 885 938 return VINF_SUCCESS; 886 939 }
Note:
See TracChangeset
for help on using the changeset viewer.