VirtualBox

Ignore:
Timestamp:
Oct 23, 2024 4:54:39 PM (5 weeks ago)
Author:
vboxsync
Message:

Disassembler: Re-arrange the ARMv8 tables to allow for multiple decoders for a single instruction class in case instructions in the same class require different decoding, implement decoding of 2-source instructions, bugref:10394

File:
1 edited

Legend:

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

    r106618 r106626  
    8080static FNDISPARSEARMV8 disArmV8ParseImmZero;
    8181static FNDISPARSEARMV8 disArmV8ParseGprZr;
     82static FNDISPARSEARMV8 disArmV8ParseGprZr32;
     83static FNDISPARSEARMV8 disArmV8ParseGprZr64;
    8284static FNDISPARSEARMV8 disArmV8ParseGprSp;
    8385static FNDISPARSEARMV8 disArmV8ParseGprOff;
     
    129131    disArmV8ParseImmZero,
    130132    disArmV8ParseGprZr,
     133    disArmV8ParseGprZr32,
     134    disArmV8ParseGprZr64,
    131135    disArmV8ParseGprSp,
    132136    disArmV8ParseGprOff,
     
    306310
    307311
     312static 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
     321static 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
    308330static int disArmV8ParseGprSp(PDISSTATE pDis, uint32_t u32Insn, PCDISARMV8OPCODE pOp, PCDISARMV8INSNCLASS pInsnClass, PDISOPPARAM pParam, PCDISARMV8INSNPARAM pInsnParm, bool *pf64Bit)
    309331{
     
    950972    int rc = VINF_SUCCESS;
    951973    PCDISARMV8INSNPARAM pDecode = &pInsnClass->paParms[0];
     974    if (pOp->paDecode)
     975        pDecode = &pOp->paDecode[0];
    952976    while (   (pDecode->idxParse != kDisParmParseNop)
    953977           && RT_SUCCESS(rc))
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