VirtualBox

Ignore:
Timestamp:
Aug 22, 2024 6:13:37 PM (3 months ago)
Author:
vboxsync
Message:

Disassembler/ARMv8: Implement decoding of the ldp/stp unsigned variant instructions and add testcases, bugref:10394

File:
1 edited

Legend:

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

    r105815 r105830  
    611611
    612612/*
     613 * STP/LDP/STGP/LDPSW
     614 *
     615 * Note: The opc,L bitfields are concatenated to form an index.
     616 */
     617DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_BEGIN(LdStRegPairOff)
     618 DIS_ARMV8_OP_EX(0x29000000, "stp",             OP_ARMV8_A64_STP,       DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_32BIT),
     619 DIS_ARMV8_OP_EX(0x29400000, "ldp",             OP_ARMV8_A64_LDP,       DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_32BIT),
     620    INVALID_OPCODE,
     621    INVALID_OPCODE,
     622 DIS_ARMV8_OP_EX(0xa9000000, "stp",             OP_ARMV8_A64_STP,       DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_64BIT),
     623 DIS_ARMV8_OP_EX(0xa9400000, "ldp",             OP_ARMV8_A64_LDP,       DISOPTYPE_HARMLESS, DISARMV8INSNCLASS_F_FORCED_64BIT),
     624    INVALID_OPCODE,
     625    INVALID_OPCODE,
     626DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_DECODER(LdStRegPairOff)
     627    DIS_ARMV8_INSN_DECODE(kDisParmParseReg,            0,  5, 0 /*idxParam*/),
     628    DIS_ARMV8_INSN_DECODE(kDisParmParseReg,           10,  5, 1 /*idxParam*/),
     629    DIS_ARMV8_INSN_DECODE(kDisParmParseReg,            5,  5, 2 /*idxParam*/),
     630    DIS_ARMV8_INSN_DECODE(kDisParmParseSImmMemOff,    15,  7, 2 /*idxParam*/),
     631DIS_ARMV8_DECODE_INSN_CLASS_DEFINE_END_PARAMS_3(LdStRegPairOff, 0xffc00000 /*fFixedInsn*/, 0 /*fClass*/,
     632                                                kDisArmV8OpcDecodeCollate,
     633                                                RT_BIT_32(22) | RT_BIT_32(30) | RT_BIT_32(31), 22,
     634                                                kDisArmv8OpParmGpr, kDisArmv8OpParmGpr, kDisArmv8OpParmAddrInGpr);
     635
     636
     637/*
     638 * C4.1.94 - Loads and Stores - Load/Store register pair variants
     639 *
     640 * Differentiate further based on the op2<14:13> field.
     641 *
     642 *     Bit  24 23
     643 *     +-------------------------------------------
     644 *           0  0 Load/store no-allocate pair (offset)
     645 *           0  1 Load/store register pair (post-indexed)
     646 *           1  0 Load/store register pair (offset).
     647 *           1  1 Load/store register pair (pre-indexed).
     648 */
     649DIS_ARMV8_DECODE_MAP_DEFINE_BEGIN(LdStRegPair)
     650    DIS_ARMV8_DECODE_MAP_INVALID_ENTRY,             /** @todo */
     651    DIS_ARMV8_DECODE_MAP_INVALID_ENTRY,             /** @todo */
     652    DIS_ARMV8_DECODE_MAP_ENTRY(LdStRegPairOff),
     653    DIS_ARMV8_DECODE_MAP_INVALID_ENTRY,             /** @todo */
     654DIS_ARMV8_DECODE_MAP_DEFINE_END(LdStRegPair, RT_BIT_32(23) | RT_BIT_32(24), 23);
     655
     656
     657/*
    613658 * C4.1.94 - Loads and Stores
    614659 *
     
    628673    DIS_ARMV8_DECODE_MAP_INVALID_ENTRY,             /** @todo */
    629674    DIS_ARMV8_DECODE_MAP_INVALID_ENTRY,             /** @todo */
    630     DIS_ARMV8_DECODE_MAP_INVALID_ENTRY,             /** @todo */
     675    DIS_ARMV8_DECODE_MAP_ENTRY(LdStRegPair),
    631676    DIS_ARMV8_DECODE_MAP_ENTRY(LdStReg),
    632677DIS_ARMV8_DECODE_MAP_DEFINE_END(LdStOp0Lo, RT_BIT_32(28) | RT_BIT_32(29), 28);
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