VirtualBox

Ignore:
Timestamp:
Jun 1, 2022 7:38:29 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
151664
Message:

VMM/IEM,DIS: Refreshed my memory on generating disassembler tables from IEM, making some related VEX table+code optimizations (saves a few Ks of data and some code bytes too). bugref:6251

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Disassembler/DisasmInternal.h

    r93115 r95167  
    8585/** @}  */
    8686
     87/**
     88 * Opcode map descriptor.
     89 *
     90 * This is used a number of places to save storage space where there are lots of
     91 * invalid instructions and the beginning or end of the map.
     92 */
     93typedef struct DISOPMAPDESC
     94{
     95    /** Pointer to the opcodes described by this structure. */
     96    PCDISOPCODE     papOpcodes;
     97#if ARCH_BITS <= 32
     98    uint16_t
     99#else
     100    uint32_t
     101#endif
     102    /** The map index corresponding to the first papOpcodes entry. */
     103                    idxFirst,
     104    /** Number of opcodes in the map. */
     105                    cOpcodes;
     106} DISOPMAPDESC;
     107/** Pointer to a const opcode map descriptor. */
     108typedef DISOPMAPDESC const *PCDISOPMAPDESC;
    87109
    88110/** @name Opcode maps.
     
    125147/** VEX opcodes table defined by [VEX.m-mmmm - 1].
    126148  * 0Fh, 0F38h, 0F3Ah correspondingly, VEX.pp = 00b */
    127 extern PCDISOPCODE const g_aVexOpcodesMap[3];
     149extern PCDISOPMAPDESC const g_apVexOpcodesMapRanges_None[3];
    128150
    129151/** VEX opcodes table defined by [VEX.m-mmmm - 1].
    130152  * 0Fh, 0F38h, 0F3Ah correspondingly, VEX.pp = 01b (66h) */
    131 extern PCDISOPCODE const g_aVexOpcodesMap_66H[3];
     153extern PCDISOPMAPDESC const g_apVexOpcodesMapRanges_66H[3];
    132154
    133155/** 0Fh, 0F38h, 0F3Ah correspondingly, VEX.pp = 10b (F3h) */
    134 extern PCDISOPCODE const g_aVexOpcodesMap_F3H[3];
     156extern PCDISOPMAPDESC const g_apVexOpcodesMapRanges_F3H[3];
    135157
    136158/** 0Fh, 0F38h, 0F3Ah correspondingly, VEX.pp = 11b (F2h) */
    137 extern PCDISOPCODE const g_aVexOpcodesMap_F2H[3];
     159extern PCDISOPMAPDESC const g_apVexOpcodesMapRanges_F2H[3];
     160
     161/** Two dimmentional map descriptor array: first index is by VEX.pp (prefix),
     162 * second by the VEX.mmmm (map).
     163 * The latter has to be bounced checked as we only have the first 4 maps. */
     164extern PCDISOPMAPDESC const g_aapVexOpcodesMapRanges[4][4];
    138165/** @} */
    139166
Note: See TracChangeset for help on using the changeset viewer.

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