VirtualBox

Ignore:
Timestamp:
Oct 28, 2024 3:54:21 PM (3 months ago)
Author:
vboxsync
Message:

Disassembler: Decode ldraa/ldrab instructions, bugref:10394

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Disassembler/DisasmCore-armv8.cpp

    r106754 r106758  
    114114static FNDISPARSEARMV8 disArmV8ParseSf;
    115115static FNDISPARSEARMV8 disArmV8ParseImmX16;
     116static FNDISPARSEARMV8 disArmV8ParseLdrPacImm;
     117static FNDISPARSEARMV8 disArmV8ParseLdrPacW;
    116118/** @}  */
    117119
     
    172174    disArmV8ParseImmHImmB,
    173175    disArmV8ParseSf,
    174     disArmV8ParseImmX16
     176    disArmV8ParseImmX16,
     177    disArmV8ParseLdrPacImm,
     178    disArmV8ParseLdrPacW
    175179};
    176180
     
    10301034
    10311035
     1036static int disArmV8ParseLdrPacImm(PDISSTATE pDis, uint32_t u32Insn, PCDISARMV8OPCODE pOp, PCDISARMV8INSNCLASS pInsnClass, PDISOPPARAM pParam, PCDISARMV8INSNPARAM pInsnParm, bool *pf64Bit)
     1037{
     1038    RT_NOREF(pDis, pOp, pInsnClass, pParam, pInsnParm, pf64Bit);
     1039
     1040    Assert(pInsnParm->cBits == 0);
     1041    Assert(pInsnParm->idxBitStart == 0);
     1042    Assert(pParam->armv8.enmType != kDisArmv8OpParmNone);
     1043
     1044    uint32_t u32 = disArmV8ExtractBitVecFromInsn(u32Insn, 12, 9) | ((u32Insn & RT_BIT_32(22)) >> 13);
     1045    pParam->armv8.cb = sizeof(int16_t);
     1046    pParam->armv8.u.offBase = disArmV8ExtractBitVecFromInsnSignExtend(u32, 0, 10) << 3;
     1047    return VINF_SUCCESS;
     1048}
     1049
     1050
     1051static int disArmV8ParseLdrPacW(PDISSTATE pDis, uint32_t u32Insn, PCDISARMV8OPCODE pOp, PCDISARMV8INSNCLASS pInsnClass, PDISOPPARAM pParam, PCDISARMV8INSNPARAM pInsnParm, bool *pf64Bit)
     1052{
     1053    RT_NOREF(pDis, pOp, pInsnClass, pParam, pInsnParm, pf64Bit);
     1054
     1055    Assert(pInsnParm->cBits == 1);
     1056    Assert(pInsnParm->idxBitStart == 11);
     1057    if (u32Insn & RT_BIT_32(11))
     1058        pParam->fUse |= DISUSE_PRE_INDEXED;
     1059    return VINF_SUCCESS;
     1060}
     1061
     1062
    10321063static uint32_t disArmV8DecodeIllegal(PDISSTATE pDis, uint32_t u32Insn, PCDISARMV8INSNCLASS pInsnClass)
    10331064{
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette