VirtualBox

Changeset 92805 in vbox


Ignore:
Timestamp:
Dec 8, 2021 8:58:32 AM (3 years ago)
Author:
vboxsync
Message:

Disasm: Pack DISOPCODE in DIS_CORE_ONLY mode on x86 and amd64 to save a little space (~8KB).

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/dis.h

    r85121 r92805  
    488488 * Opcode descriptor.
    489489 */
     490#if (defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)) && defined(DIS_CORE_ONLY)
     491# pragma pack(1)
     492#endif
    490493typedef struct DISOPCODE
    491494{
     
    512515    /** Parameter \#4 info, @see grp_dis_opparam. */
    513516    uint16_t    fParam4;
     517#if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || !defined(DIS_CORE_ONLY)
    514518    /** padding unused */
    515519    uint16_t    uPadding;
     520#endif
    516521    /** Operand type flags, DISOPTYPE_XXX. */
    517522    uint32_t    fOpType;
    518523} DISOPCODE;
     524#if (defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)) && defined(DIS_CORE_ONLY)
     525# pragma pack()
     526#endif
    519527/** Pointer to const opcode. */
    520528typedef const struct DISOPCODE *PCDISOPCODE;
  • trunk/src/VBox/Disassembler/DisasmInternal.h

    r82968 r92805  
    199199# define OPVEX(pszOpcode, idxParse1, idxParse2, idxParse3, idxParse4, opcode, param1, param2, param3, param4, optype) \
    200200    { pszOpcode, idxParse1, idxParse2, idxParse3, idxParse4, opcode, param1, param2, param3, param4, 0, optype | DISOPTYPE_SSE }
     201#elif defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64)
     202# define OP(pszOpcode, idxParse1, idxParse2, idxParse3, opcode, param1, param2, param3, optype) \
     203    { idxParse1, idxParse2, idxParse3, 0, opcode, param1, param2, param3, 0, optype }
     204# define OPVEX(pszOpcode, idxParse1, idxParse2, idxParse3, idxParse4, opcode, param1, param2, param3, param4, optype) \
     205    { idxParse1, idxParse2, idxParse3, idxParse4, opcode, param1, param2, param3, param4, optype | DISOPTYPE_SSE}
    201206#else
    202207# define OP(pszOpcode, idxParse1, idxParse2, idxParse3, opcode, param1, param2, param3, optype) \
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