VirtualBox

Changeset 41727 in vbox


Ignore:
Timestamp:
Jun 14, 2012 10:49:03 PM (12 years ago)
Author:
vboxsync
Message:

DIS: register macro name adjustments.

Location:
trunk
Files:
19 edited

Legend:

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

    r41706 r41727  
    192192/** @} */
    193193
    194 /** index in {"RAX", "RCX", "RDX", "RBX", "RSP", "RBP", "RSI", "RDI", "R8", "R9", "R10", "R11", "R12", "R13", "R14", "R15"}
    195  * @{
    196  */
    197 #define USE_REG_RAX                     0
    198 #define USE_REG_RCX                     1
    199 #define USE_REG_RDX                     2
    200 #define USE_REG_RBX                     3
    201 #define USE_REG_RSP                     4
    202 #define USE_REG_RBP                     5
    203 #define USE_REG_RSI                     6
    204 #define USE_REG_RDI                     7
    205 #define USE_REG_R8                      8
    206 #define USE_REG_R9                      9
    207 #define USE_REG_R10                     10
    208 #define USE_REG_R11                     11
    209 #define USE_REG_R12                     12
    210 #define USE_REG_R13                     13
    211 #define USE_REG_R14                     14
    212 #define USE_REG_R15                     15
    213 /** @} */
    214 
    215 /** index in {"EAX", "ECX", "EDX", "EBX", "ESP", "EBP", "ESI", "EDI", "R8D", "R9D", "R10D", "R11D", "R12D", "R13D", "R14D", "R15D"}
    216  * @{
    217  */
    218 #define USE_REG_EAX                     0
    219 #define USE_REG_ECX                     1
    220 #define USE_REG_EDX                     2
    221 #define USE_REG_EBX                     3
    222 #define USE_REG_ESP                     4
    223 #define USE_REG_EBP                     5
    224 #define USE_REG_ESI                     6
    225 #define USE_REG_EDI                     7
    226 #define USE_REG_R8D                     8
    227 #define USE_REG_R9D                     9
    228 #define USE_REG_R10D                    10
    229 #define USE_REG_R11D                    11
    230 #define USE_REG_R12D                    12
    231 #define USE_REG_R13D                    13
    232 #define USE_REG_R14D                    14
    233 #define USE_REG_R15D                    15
    234 /** @} */
    235 
    236 /** index in {"AX", "CX", "DX", "BX", "SP", "BP", "SI", "DI", "R8W", "R9W", "R10W", "R11W", "R12W", "R13W", "R14W", "R15W"}
    237  * @{
    238  */
    239 #define USE_REG_AX                      0
    240 #define USE_REG_CX                      1
    241 #define USE_REG_DX                      2
    242 #define USE_REG_BX                      3
    243 #define USE_REG_SP                      4
    244 #define USE_REG_BP                      5
    245 #define USE_REG_SI                      6
    246 #define USE_REG_DI                      7
    247 #define USE_REG_R8W                     8
    248 #define USE_REG_R9W                     9
    249 #define USE_REG_R10W                    10
    250 #define USE_REG_R11W                    11
    251 #define USE_REG_R12W                    12
    252 #define USE_REG_R13W                    13
    253 #define USE_REG_R14W                    14
    254 #define USE_REG_R15W                    15
    255 /** @} */
    256 
    257 /** index in {"AL", "CL", "DL", "BL", "AH", "CH", "DH", "BH", "R8B", "R9B", "R10B", "R11B", "R12B", "R13B", "R14B", "R15B", "SPL", "BPL", "SIL", "DIL"}
    258  * @{
    259  */
    260 #define USE_REG_AL                      0
    261 #define USE_REG_CL                      1
    262 #define USE_REG_DL                      2
    263 #define USE_REG_BL                      3
    264 #define USE_REG_AH                      4
    265 #define USE_REG_CH                      5
    266 #define USE_REG_DH                      6
    267 #define USE_REG_BH                      7
    268 #define USE_REG_R8B                     8
    269 #define USE_REG_R9B                     9
    270 #define USE_REG_R10B                    10
    271 #define USE_REG_R11B                    11
    272 #define USE_REG_R12B                    12
    273 #define USE_REG_R13B                    13
    274 #define USE_REG_R14B                    14
    275 #define USE_REG_R15B                    15
    276 #define USE_REG_SPL                     16
    277 #define USE_REG_BPL                     17
    278 #define USE_REG_SIL                     18
    279 #define USE_REG_DIL                     19
    280 
    281 /** @} */
    282 
    283 /** index in {ES, CS, SS, DS, FS, GS}
     194/** @name 64-bit general register indexes.
     195 * This matches the AMD64 register encoding.  It is found used in
     196 * DISOPPARAM::base.reg_gen and DISOPPARAM::index.reg_gen.
     197 * @note  Safe to assume same values as the 16-bit and 32-bit general registers.
     198 * @{
     199 */
     200#define DISGREG_RAX                     UINT8_C(0)
     201#define DISGREG_RCX                     UINT8_C(1)
     202#define DISGREG_RDX                     UINT8_C(2)
     203#define DISGREG_RBX                     UINT8_C(3)
     204#define DISGREG_RSP                     UINT8_C(4)
     205#define DISGREG_RBP                     UINT8_C(5)
     206#define DISGREG_RSI                     UINT8_C(6)
     207#define DISGREG_RDI                     UINT8_C(7)
     208#define DISGREG_R8                      UINT8_C(8)
     209#define DISGREG_R9                      UINT8_C(9)
     210#define DISGREG_R10                     UINT8_C(10)
     211#define DISGREG_R11                     UINT8_C(11)
     212#define DISGREG_R12                     UINT8_C(12)
     213#define DISGREG_R13                     UINT8_C(13)
     214#define DISGREG_R14                     UINT8_C(14)
     215#define DISGREG_R15                     UINT8_C(15)
     216/** @} */
     217
     218/** @name 32-bit general register indexes.
     219 * This matches the AMD64 register encoding.  It is found used in
     220 * DISOPPARAM::base.reg_gen and DISOPPARAM::index.reg_gen.
     221 * @note  Safe to assume same values as the 16-bit and 64-bit general registers.
     222 * @{
     223 */
     224#define DISGREG_EAX                     UINT8_C(0)
     225#define DISGREG_ECX                     UINT8_C(1)
     226#define DISGREG_EDX                     UINT8_C(2)
     227#define DISGREG_EBX                     UINT8_C(3)
     228#define DISGREG_ESP                     UINT8_C(4)
     229#define DISGREG_EBP                     UINT8_C(5)
     230#define DISGREG_ESI                     UINT8_C(6)
     231#define DISGREG_EDI                     UINT8_C(7)
     232#define DISGREG_R8D                     UINT8_C(8)
     233#define DISGREG_R9D                     UINT8_C(9)
     234#define DISGREG_R10D                    UINT8_C(10)
     235#define DISGREG_R11D                    UINT8_C(11)
     236#define DISGREG_R12D                    UINT8_C(12)
     237#define DISGREG_R13D                    UINT8_C(13)
     238#define DISGREG_R14D                    UINT8_C(14)
     239#define DISGREG_R15D                    UINT8_C(15)
     240/** @} */
     241
     242/** @name 16-bit general register indexes.
     243 * This matches the AMD64 register encoding.  It is found used in
     244 * DISOPPARAM::base.reg_gen and DISOPPARAM::index.reg_gen.
     245 * @note  Safe to assume same values as the 32-bit and 64-bit general registers.
     246 * @{
     247 */
     248#define DISGREG_AX                      UINT8_C(0)
     249#define DISGREG_CX                      UINT8_C(1)
     250#define DISGREG_DX                      UINT8_C(2)
     251#define DISGREG_BX                      UINT8_C(3)
     252#define DISGREG_SP                      UINT8_C(4)
     253#define DISGREG_BP                      UINT8_C(5)
     254#define DISGREG_SI                      UINT8_C(6)
     255#define DISGREG_DI                      UINT8_C(7)
     256#define DISGREG_R8W                     UINT8_C(8)
     257#define DISGREG_R9W                     UINT8_C(9)
     258#define DISGREG_R10W                    UINT8_C(10)
     259#define DISGREG_R11W                    UINT8_C(11)
     260#define DISGREG_R12W                    UINT8_C(12)
     261#define DISGREG_R13W                    UINT8_C(13)
     262#define DISGREG_R14W                    UINT8_C(14)
     263#define DISGREG_R15W                    UINT8_C(15)
     264/** @} */
     265
     266/** @name 8-bit general register indexes.
     267 * This mostly (?) matches the AMD64 register encoding.  It is found used in
     268 * DISOPPARAM::base.reg_gen and DISOPPARAM::index.reg_gen.
     269 * @{
     270 */
     271#define DISGREG_AL                      UINT8_C(0)
     272#define DISGREG_CL                      UINT8_C(1)
     273#define DISGREG_DL                      UINT8_C(2)
     274#define DISGREG_BL                      UINT8_C(3)
     275#define DISGREG_AH                      UINT8_C(4)
     276#define DISGREG_CH                      UINT8_C(5)
     277#define DISGREG_DH                      UINT8_C(6)
     278#define DISGREG_BH                      UINT8_C(7)
     279#define DISGREG_R8B                     UINT8_C(8)
     280#define DISGREG_R9B                     UINT8_C(9)
     281#define DISGREG_R10B                    UINT8_C(10)
     282#define DISGREG_R11B                    UINT8_C(11)
     283#define DISGREG_R12B                    UINT8_C(12)
     284#define DISGREG_R13B                    UINT8_C(13)
     285#define DISGREG_R14B                    UINT8_C(14)
     286#define DISGREG_R15B                    UINT8_C(15)
     287#define DISGREG_SPL                     UINT8_C(16)
     288#define DISGREG_BPL                     UINT8_C(17)
     289#define DISGREG_SIL                     UINT8_C(18)
     290#define DISGREG_DIL                     UINT8_C(19)
     291/** @} */
     292
     293/** @name Segment registerindexes.
     294 * This matches the AMD64 register encoding.  It is found used in
     295 * DISOPPARAM::base.reg_seg.
    284296 * @{
    285297 */
    286298typedef enum
    287299{
    288     DIS_SELREG_ES = 0,
    289     DIS_SELREG_CS = 1,
    290     DIS_SELREG_SS = 2,
    291     DIS_SELREG_DS = 3,
    292     DIS_SELREG_FS = 4,
    293     DIS_SELREG_GS = 5,
     300    DISSELREG_ES = 0,
     301    DISSELREG_CS = 1,
     302    DISSELREG_SS = 2,
     303    DISSELREG_DS = 3,
     304    DISSELREG_FS = 4,
     305    DISSELREG_GS = 5,
    294306    /** The usual 32-bit paranoia. */
    295307    DIS_SEGREG_32BIT_HACK = 0x7fffffff
    296 } DIS_SELREG;
     308} DISSELREG;
    297309/** @} */
    298310
     
    410422    union
    411423    {
     424        /** DISGREG_XXX. */
    412425        uint8_t     reg_gen;
    413426        /** ST(0) - ST(7) */
     
    417430        /** XMM0 - XMM7 */
    418431        uint8_t     reg_xmm;
    419         /** {ES, CS, SS, DS, FS, GS} (DIS_SELREG). */
     432        /** {ES, CS, SS, DS, FS, GS} (DISSELREG). */
    420433        uint8_t     reg_seg;
    421434        /** TR0-TR7 (?) */
     
    428441    union
    429442    {
     443        /** DISGREG_XXX. */
    430444        uint8_t     reg_gen;
    431445    } index;
     
    476490
    477491    /* off: 0x060 (96) */
    478     /** ModRM fields. */               
     492    /** ModRM fields. */
    479493    union
    480494    {
     
    502516        unsigned            u;
    503517    } SIB;
    504     int32_t         i32SibDisp;         
     518    int32_t         i32SibDisp;
    505519
    506520    /* off: 0x06c (108) */
    507521    /** The CPU mode (DISCPUMODE). */
    508     uint8_t         mode;               
     522    uint8_t         mode;
    509523    /** The addressing mode (DISCPUMODE). */
    510524    uint8_t         addrmode;
     
    512526    uint8_t         opmode;
    513527    /** Per instruction prefix settings. */
    514     uint8_t         prefix; 
     528    uint8_t         prefix;
    515529    /* off: 0x070 (112) */
    516530    /** REX prefix value (64 bits only). */
    517     uint8_t         prefix_rex;         
    518     /** Segment prefix value (DIS_SELREG). */
     531    uint8_t         prefix_rex;
     532    /** Segment prefix value (DISSELREG). */
    519533    uint8_t         idxSegPrefix;
    520534    /** Last prefix byte (for SSE2 extension tables). */
     
    524538    /* off: 0x074 (116) */
    525539    /** The size of the prefix bytes. */
    526     uint8_t         cbPrefix;           
     540    uint8_t         cbPrefix;
    527541    /** The instruction size. */
    528542    uint8_t         opsize;
     
    567581
    568582
    569 /** 
    570  * Opcode descriptor. 
    571  */ 
     583/**
     584 * Opcode descriptor.
     585 */
    572586typedef struct DISOPCODE
    573587{
     
    603617
    604618DISDECL(int)        DISGetParamSize(PDISCPUSTATE pCpu, PDISOPPARAM pParam);
    605 DISDECL(DIS_SELREG) DISDetectSegReg(PDISCPUSTATE pCpu, PDISOPPARAM pParam);
     619DISDECL(DISSELREG) DISDetectSegReg(PDISCPUSTATE pCpu, PDISOPPARAM pParam);
    606620DISDECL(uint8_t)    DISQuerySegPrefixByte(PDISCPUSTATE pCpu);
    607621
     
    613627DISDECL(int) DISFetchReg32(PCCPUMCTXCORE pCtx, unsigned reg32, uint32_t *pVal);
    614628DISDECL(int) DISFetchReg64(PCCPUMCTXCORE pCtx, unsigned reg64, uint64_t *pVal);
    615 DISDECL(int) DISFetchRegSeg(PCCPUMCTXCORE pCtx, DIS_SELREG sel, RTSEL *pVal);
    616 DISDECL(int) DISFetchRegSegEx(PCCPUMCTXCORE pCtx, DIS_SELREG sel, RTSEL *pVal, PCPUMSELREGHID *ppSelHidReg);
     629DISDECL(int) DISFetchRegSeg(PCCPUMCTXCORE pCtx, DISSELREG sel, RTSEL *pVal);
     630DISDECL(int) DISFetchRegSegEx(PCCPUMCTXCORE pCtx, DISSELREG sel, RTSEL *pVal, PCPUMSELREGHID *ppSelHidReg);
    617631DISDECL(int) DISWriteReg8(PCPUMCTXCORE pRegFrame, unsigned reg8, uint8_t val8);
    618632DISDECL(int) DISWriteReg16(PCPUMCTXCORE pRegFrame, unsigned reg32, uint16_t val16);
    619633DISDECL(int) DISWriteReg32(PCPUMCTXCORE pRegFrame, unsigned reg32, uint32_t val32);
    620634DISDECL(int) DISWriteReg64(PCPUMCTXCORE pRegFrame, unsigned reg64, uint64_t val64);
    621 DISDECL(int) DISWriteRegSeg(PCPUMCTXCORE pCtx, DIS_SELREG sel, RTSEL val);
     635DISDECL(int) DISWriteRegSeg(PCPUMCTXCORE pCtx, DISSELREG sel, RTSEL val);
    622636DISDECL(int) DISPtrReg8(PCPUMCTXCORE pCtx, unsigned reg8, uint8_t **ppReg);
    623637DISDECL(int) DISPtrReg16(PCPUMCTXCORE pCtx, unsigned reg16, uint16_t **ppReg);
  • trunk/include/VBox/vmm/selm.h

    r40449 r41727  
    5050VMMDECL(RTRCPTR)    SELMGetHyperGDT(PVM pVM);
    5151VMMDECL(int)        SELMGetTSSInfo(PVM pVM, PVMCPU pVCpu, PRTGCUINTPTR pGCPtrTss, PRTGCUINTPTR pcbTss, bool *pfCanHaveIOBitmap);
    52 VMMDECL(RTGCPTR)    SELMToFlat(PVM pVM, DIS_SELREG SelReg, PCPUMCTXCORE pCtxCore, RTGCPTR Addr);
     52VMMDECL(RTGCPTR)    SELMToFlat(PVM pVM, DISSELREG SelReg, PCPUMCTXCORE pCtxCore, RTGCPTR Addr);
    5353VMMDECL(RTGCPTR)    SELMToFlatBySel(PVM pVM, RTSEL Sel, RTGCPTR Addr);
    5454VMMDECL(void)       SELMShadowCR3Changed(PVM pVM, PVMCPU pVCpu);
     
    7474/** @} */
    7575
    76 VMMDECL(int)        SELMToFlatEx(PVMCPU pVCpu, DIS_SELREG SelReg, PCCPUMCTXCORE pCtxCore, RTGCPTR Addr, unsigned fFlags, PRTGCPTR ppvGC);
     76VMMDECL(int)        SELMToFlatEx(PVMCPU pVCpu, DISSELREG SelReg, PCCPUMCTXCORE pCtxCore, RTGCPTR Addr, unsigned fFlags, PRTGCPTR ppvGC);
    7777VMMDECL(int)        SELMToFlatBySelEx(PVMCPU pVCpu, X86EFLAGS eflags, RTSEL Sel, RTGCPTR Addr, PCCPUMSELREGHID pHiddenSel,
    7878                                      uint32_t fFlags, PRTGCPTR ppvGC, uint32_t *pcb);
  • trunk/src/VBox/Disassembler/DisasmCore.cpp

    r41713 r41727  
    306306    }
    307307    pCpu->prefix            = DISPREFIX_NONE;
    308     pCpu->idxSegPrefix      = DIS_SELREG_DS;
     308    pCpu->idxSegPrefix      = DISSELREG_DS;
    309309    pCpu->uInstrAddr        = uInstrAddr;
    310310    pCpu->pfnDisasmFnTable  = g_apfnFullDisasm;
     
    359359            // segment override prefix byte
    360360            case OP_SEG:
    361                 pCpu->idxSegPrefix = (DIS_SELREG)(paOneByteMap[codebyte].param1 - OP_PARM_REG_SEG_START);
     361                pCpu->idxSegPrefix = (DISSELREG)(paOneByteMap[codebyte].param1 - OP_PARM_REG_SEG_START);
    362362                /* Segment prefixes for CS, DS, ES and SS are ignored in long mode. */
    363363                if (   pCpu->mode != DISCPUMODE_64BIT
    364                     || pCpu->idxSegPrefix >= DIS_SELREG_FS)
     364                    || pCpu->idxSegPrefix >= DISSELREG_FS)
    365365                {
    366366                    pCpu->prefix    |= DISPREFIX_SEG;
     
    15911591    {
    15921592        /* Segment ES..GS registers. */
    1593         pParam->base.reg_seg = (DIS_SELREG)(pParam->param - OP_PARM_REG_SEG_START);
     1593        pParam->base.reg_seg = (DISSELREG)(pParam->param - OP_PARM_REG_SEG_START);
    15941594        pParam->fUse  |= DISUSE_REG_SEG;
    15951595        pParam->cb     = 2;
     
    16431643    if (pCpu->addrmode == DISCPUMODE_32BIT)
    16441644    {
    1645         pParam->base.reg_gen = USE_REG_ESI;
     1645        pParam->base.reg_gen = DISGREG_ESI;
    16461646        pParam->fUse |= DISUSE_REG_GEN32;
    16471647    }
     
    16491649    if (pCpu->addrmode == DISCPUMODE_64BIT)
    16501650    {
    1651         pParam->base.reg_gen = USE_REG_RSI;
     1651        pParam->base.reg_gen = DISGREG_RSI;
    16521652        pParam->fUse |= DISUSE_REG_GEN64;
    16531653    }
    16541654    else
    16551655    {
    1656         pParam->base.reg_gen = USE_REG_SI;
     1656        pParam->base.reg_gen = DISGREG_SI;
    16571657        pParam->fUse |= DISUSE_REG_GEN16;
    16581658    }
     
    16681668    if (pCpu->addrmode == DISCPUMODE_32BIT)
    16691669    {
    1670         pParam->base.reg_gen = USE_REG_ESI;
     1670        pParam->base.reg_gen = DISGREG_ESI;
    16711671        pParam->fUse |= DISUSE_REG_GEN32;
    16721672    }
     
    16741674    if (pCpu->addrmode == DISCPUMODE_64BIT)
    16751675    {
    1676         pParam->base.reg_gen = USE_REG_RSI;
     1676        pParam->base.reg_gen = DISGREG_RSI;
    16771677        pParam->fUse |= DISUSE_REG_GEN64;
    16781678    }
    16791679    else
    16801680    {
    1681         pParam->base.reg_gen = USE_REG_SI;
     1681        pParam->base.reg_gen = DISGREG_SI;
    16821682        pParam->fUse |= DISUSE_REG_GEN16;
    16831683    }
     
    16931693    if (pCpu->addrmode == DISCPUMODE_32BIT)
    16941694    {
    1695         pParam->base.reg_gen = USE_REG_EDI;
     1695        pParam->base.reg_gen = DISGREG_EDI;
    16961696        pParam->fUse |= DISUSE_REG_GEN32;
    16971697    }
     
    16991699    if (pCpu->addrmode == DISCPUMODE_64BIT)
    17001700    {
    1701         pParam->base.reg_gen = USE_REG_RDI;
     1701        pParam->base.reg_gen = DISGREG_RDI;
    17021702        pParam->fUse |= DISUSE_REG_GEN64;
    17031703    }
    17041704    else
    17051705    {
    1706         pParam->base.reg_gen = USE_REG_DI;
     1706        pParam->base.reg_gen = DISGREG_DI;
    17071707        pParam->fUse |= DISUSE_REG_GEN16;
    17081708    }
     
    17181718    if (pCpu->addrmode == DISCPUMODE_32BIT)
    17191719    {
    1720         pParam->base.reg_gen = USE_REG_EDI;
     1720        pParam->base.reg_gen = DISGREG_EDI;
    17211721        pParam->fUse |= DISUSE_REG_GEN32;
    17221722    }
     
    17241724    if (pCpu->addrmode == DISCPUMODE_64BIT)
    17251725    {
    1726         pParam->base.reg_gen = USE_REG_RDI;
     1726        pParam->base.reg_gen = DISGREG_RDI;
    17271727        pParam->fUse |= DISUSE_REG_GEN64;
    17281728    }
    17291729    else
    17301730    {
    1731         pParam->base.reg_gen = USE_REG_DI;
     1731        pParam->base.reg_gen = DISGREG_DI;
    17321732        pParam->fUse |= DISUSE_REG_GEN16;
    17331733    }
     
    22942294#endif
    22952295static const char *szModRMSegReg[6]   = {"ES", "CS", "SS", "DS", "FS", "GS"};
    2296 static const int   BaseModRMReg16[8]  = { USE_REG_BX, USE_REG_BX, USE_REG_BP, USE_REG_BP, USE_REG_SI, USE_REG_DI, USE_REG_BP, USE_REG_BX};
    2297 static const int   IndexModRMReg16[4] = { USE_REG_SI, USE_REG_DI, USE_REG_SI, USE_REG_DI};
     2296static const int   BaseModRMReg16[8]  = { DISGREG_BX, DISGREG_BX, DISGREG_BP, DISGREG_BP, DISGREG_SI, DISGREG_DI, DISGREG_BP, DISGREG_BX};
     2297static const int   IndexModRMReg16[4] = { DISGREG_SI, DISGREG_DI, DISGREG_SI, DISGREG_DI};
    22982298//*****************************************************************************
    22992299static void disasmModRMReg(PDISCPUSTATE pCpu, PCDISOPCODE pOp, unsigned idx, PDISOPPARAM pParam, int fRegAddr)
     
    23362336        /* Intel® 64 and IA-32 Architectures Software Developer’s Manual: 3.4.1.1 */
    23372337        if (    (pCpu->prefix & DISPREFIX_REX)
    2338             &&  idx >= USE_REG_AH
    2339             &&  idx <= USE_REG_BH)
     2338            &&  idx >= DISGREG_AH
     2339            &&  idx <= DISGREG_BH)
    23402340        {
    2341             idx += (USE_REG_SPL - USE_REG_AH);
     2341            idx += (DISGREG_SPL - DISGREG_AH);
    23422342        }
    23432343
     
    23972397
    23982398    pParam->fUse |= DISUSE_REG_SEG;
    2399     pParam->base.reg_seg = (DIS_SELREG)idx;
     2399    pParam->base.reg_seg = (DISSELREG)idx;
    24002400}
    24012401
  • trunk/src/VBox/Disassembler/DisasmFormatYasm.cpp

    r41720 r41727  
    917917                        if (pfnGetSymbol)
    918918                        {
    919                             int rc = pfnGetSymbol(pCpu, DIS_FMT_SEL_FROM_REG(DIS_SELREG_CS), uTrgAddr, szSymbol, sizeof(szSymbol), &off, pvUser);
     919                            int rc = pfnGetSymbol(pCpu, DIS_FMT_SEL_FROM_REG(DISSELREG_CS), uTrgAddr, szSymbol, sizeof(szSymbol), &off, pvUser);
    920920                            if (RT_SUCCESS(rc))
    921921                            {
     
    968968                                PUT_NUM_16(pParam->parval);
    969969                                if (pfnGetSymbol)
    970                                     rc = pfnGetSymbol(pCpu, DIS_FMT_SEL_FROM_REG(DIS_SELREG_CS), (uint16_t)pParam->parval, szSymbol, sizeof(szSymbol), &off, pvUser);
     970                                    rc = pfnGetSymbol(pCpu, DIS_FMT_SEL_FROM_REG(DISSELREG_CS), (uint16_t)pParam->parval, szSymbol, sizeof(szSymbol), &off, pvUser);
    971971                                break;
    972972                            case DISUSE_DISPLACEMENT32:
    973973                                PUT_NUM_32(pParam->parval);
    974974                                if (pfnGetSymbol)
    975                                     rc = pfnGetSymbol(pCpu, DIS_FMT_SEL_FROM_REG(DIS_SELREG_CS), (uint32_t)pParam->parval, szSymbol, sizeof(szSymbol), &off, pvUser);
     975                                    rc = pfnGetSymbol(pCpu, DIS_FMT_SEL_FROM_REG(DISSELREG_CS), (uint32_t)pParam->parval, szSymbol, sizeof(szSymbol), &off, pvUser);
    976976                                break;
    977977                            case DISUSE_DISPLACEMENT64:
    978978                                PUT_NUM_64(pParam->parval);
    979979                                if (pfnGetSymbol)
    980                                     rc = pfnGetSymbol(pCpu, DIS_FMT_SEL_FROM_REG(DIS_SELREG_CS), (uint64_t)pParam->parval, szSymbol, sizeof(szSymbol), &off, pvUser);
     980                                    rc = pfnGetSymbol(pCpu, DIS_FMT_SEL_FROM_REG(DISSELREG_CS), (uint64_t)pParam->parval, szSymbol, sizeof(szSymbol), &off, pvUser);
    981981                                break;
    982982                            default:
     
    10321032                                PUT_NUM_16(pParam->uDisp.i16);
    10331033                                if (pfnGetSymbol)
    1034                                     rc = pfnGetSymbol(pCpu, DIS_FMT_SEL_FROM_REG(DIS_SELREG_CS), pParam->uDisp.u16, szSymbol, sizeof(szSymbol), &off, pvUser);
     1034                                    rc = pfnGetSymbol(pCpu, DIS_FMT_SEL_FROM_REG(DISSELREG_CS), pParam->uDisp.u16, szSymbol, sizeof(szSymbol), &off, pvUser);
    10351035                                break;
    10361036                            case DISUSE_DISPLACEMENT32:
    10371037                                PUT_NUM_32(pParam->uDisp.i32);
    10381038                                if (pfnGetSymbol)
    1039                                     rc = pfnGetSymbol(pCpu, DIS_FMT_SEL_FROM_REG(DIS_SELREG_CS), pParam->uDisp.u32, szSymbol, sizeof(szSymbol), &off, pvUser);
     1039                                    rc = pfnGetSymbol(pCpu, DIS_FMT_SEL_FROM_REG(DISSELREG_CS), pParam->uDisp.u32, szSymbol, sizeof(szSymbol), &off, pvUser);
    10401040                                break;
    10411041                            case DISUSE_DISPLACEMENT64:
    10421042                                PUT_NUM_64(pParam->uDisp.i64);
    10431043                                if (pfnGetSymbol)
    1044                                     rc = pfnGetSymbol(pCpu, DIS_FMT_SEL_FROM_REG(DIS_SELREG_CS), pParam->uDisp.u64, szSymbol, sizeof(szSymbol), &off, pvUser);
     1044                                    rc = pfnGetSymbol(pCpu, DIS_FMT_SEL_FROM_REG(DISSELREG_CS), pParam->uDisp.u64, szSymbol, sizeof(szSymbol), &off, pvUser);
    10451045                                break;
    10461046                            default:
  • trunk/src/VBox/Disassembler/DisasmReg.cpp

    r41692 r41727  
    4242static const unsigned g_aReg64Index[] =
    4343{
    44     RT_OFFSETOF(CPUMCTXCORE, rax),        /* USE_REG_RAX */
    45     RT_OFFSETOF(CPUMCTXCORE, rcx),        /* USE_REG_RCX */
    46     RT_OFFSETOF(CPUMCTXCORE, rdx),        /* USE_REG_RDX */
    47     RT_OFFSETOF(CPUMCTXCORE, rbx),        /* USE_REG_RBX */
    48     RT_OFFSETOF(CPUMCTXCORE, rsp),        /* USE_REG_RSP */
    49     RT_OFFSETOF(CPUMCTXCORE, rbp),        /* USE_REG_RBP */
    50     RT_OFFSETOF(CPUMCTXCORE, rsi),        /* USE_REG_RSI */
    51     RT_OFFSETOF(CPUMCTXCORE, rdi),        /* USE_REG_RDI */
    52     RT_OFFSETOF(CPUMCTXCORE, r8),         /* USE_REG_R8  */
    53     RT_OFFSETOF(CPUMCTXCORE, r9),         /* USE_REG_R9  */
    54     RT_OFFSETOF(CPUMCTXCORE, r10),        /* USE_REG_R10 */
    55     RT_OFFSETOF(CPUMCTXCORE, r11),        /* USE_REG_R11 */
    56     RT_OFFSETOF(CPUMCTXCORE, r12),        /* USE_REG_R12 */
    57     RT_OFFSETOF(CPUMCTXCORE, r13),        /* USE_REG_R13 */
    58     RT_OFFSETOF(CPUMCTXCORE, r14),        /* USE_REG_R14 */
    59     RT_OFFSETOF(CPUMCTXCORE, r15)         /* USE_REG_R15 */
     44    RT_OFFSETOF(CPUMCTXCORE, rax),        /* DISGREG_RAX */
     45    RT_OFFSETOF(CPUMCTXCORE, rcx),        /* DISGREG_RCX */
     46    RT_OFFSETOF(CPUMCTXCORE, rdx),        /* DISGREG_RDX */
     47    RT_OFFSETOF(CPUMCTXCORE, rbx),        /* DISGREG_RBX */
     48    RT_OFFSETOF(CPUMCTXCORE, rsp),        /* DISGREG_RSP */
     49    RT_OFFSETOF(CPUMCTXCORE, rbp),        /* DISGREG_RBP */
     50    RT_OFFSETOF(CPUMCTXCORE, rsi),        /* DISGREG_RSI */
     51    RT_OFFSETOF(CPUMCTXCORE, rdi),        /* DISGREG_RDI */
     52    RT_OFFSETOF(CPUMCTXCORE, r8),         /* DISGREG_R8  */
     53    RT_OFFSETOF(CPUMCTXCORE, r9),         /* DISGREG_R9  */
     54    RT_OFFSETOF(CPUMCTXCORE, r10),        /* DISGREG_R10 */
     55    RT_OFFSETOF(CPUMCTXCORE, r11),        /* DISGREG_R11 */
     56    RT_OFFSETOF(CPUMCTXCORE, r12),        /* DISGREG_R12 */
     57    RT_OFFSETOF(CPUMCTXCORE, r13),        /* DISGREG_R13 */
     58    RT_OFFSETOF(CPUMCTXCORE, r14),        /* DISGREG_R14 */
     59    RT_OFFSETOF(CPUMCTXCORE, r15)         /* DISGREG_R15 */
    6060};
    6161
     
    7373static const unsigned g_aReg32Index[] =
    7474{
    75     RT_OFFSETOF(CPUMCTXCORE, eax),        /* USE_REG_EAX */
    76     RT_OFFSETOF(CPUMCTXCORE, ecx),        /* USE_REG_ECX */
    77     RT_OFFSETOF(CPUMCTXCORE, edx),        /* USE_REG_EDX */
    78     RT_OFFSETOF(CPUMCTXCORE, ebx),        /* USE_REG_EBX */
    79     RT_OFFSETOF(CPUMCTXCORE, esp),        /* USE_REG_ESP */
    80     RT_OFFSETOF(CPUMCTXCORE, ebp),        /* USE_REG_EBP */
    81     RT_OFFSETOF(CPUMCTXCORE, esi),        /* USE_REG_ESI */
    82     RT_OFFSETOF(CPUMCTXCORE, edi),        /* USE_REG_EDI */
    83     RT_OFFSETOF(CPUMCTXCORE, r8),         /* USE_REG_R8D */
    84     RT_OFFSETOF(CPUMCTXCORE, r9),         /* USE_REG_R9D */
    85     RT_OFFSETOF(CPUMCTXCORE, r10),        /* USE_REG_R10D */
    86     RT_OFFSETOF(CPUMCTXCORE, r11),        /* USE_REG_R11D */
    87     RT_OFFSETOF(CPUMCTXCORE, r12),        /* USE_REG_R12D */
    88     RT_OFFSETOF(CPUMCTXCORE, r13),        /* USE_REG_R13D */
    89     RT_OFFSETOF(CPUMCTXCORE, r14),        /* USE_REG_R14D */
    90     RT_OFFSETOF(CPUMCTXCORE, r15)         /* USE_REG_R15D */
     75    RT_OFFSETOF(CPUMCTXCORE, eax),        /* DISGREG_EAX */
     76    RT_OFFSETOF(CPUMCTXCORE, ecx),        /* DISGREG_ECX */
     77    RT_OFFSETOF(CPUMCTXCORE, edx),        /* DISGREG_EDX */
     78    RT_OFFSETOF(CPUMCTXCORE, ebx),        /* DISGREG_EBX */
     79    RT_OFFSETOF(CPUMCTXCORE, esp),        /* DISGREG_ESP */
     80    RT_OFFSETOF(CPUMCTXCORE, ebp),        /* DISGREG_EBP */
     81    RT_OFFSETOF(CPUMCTXCORE, esi),        /* DISGREG_ESI */
     82    RT_OFFSETOF(CPUMCTXCORE, edi),        /* DISGREG_EDI */
     83    RT_OFFSETOF(CPUMCTXCORE, r8),         /* DISGREG_R8D */
     84    RT_OFFSETOF(CPUMCTXCORE, r9),         /* DISGREG_R9D */
     85    RT_OFFSETOF(CPUMCTXCORE, r10),        /* DISGREG_R1D */
     86    RT_OFFSETOF(CPUMCTXCORE, r11),        /* DISGREG_R11D */
     87    RT_OFFSETOF(CPUMCTXCORE, r12),        /* DISGREG_R12D */
     88    RT_OFFSETOF(CPUMCTXCORE, r13),        /* DISGREG_R13D */
     89    RT_OFFSETOF(CPUMCTXCORE, r14),        /* DISGREG_R14D */
     90    RT_OFFSETOF(CPUMCTXCORE, r15)         /* DISGREG_R15D */
    9191};
    9292
     
    109109static const unsigned g_aReg16Index[] =
    110110{
    111     RT_OFFSETOF(CPUMCTXCORE, eax),        /* USE_REG_AX */
    112     RT_OFFSETOF(CPUMCTXCORE, ecx),        /* USE_REG_CX */
    113     RT_OFFSETOF(CPUMCTXCORE, edx),        /* USE_REG_DX */
    114     RT_OFFSETOF(CPUMCTXCORE, ebx),        /* USE_REG_BX */
    115     RT_OFFSETOF(CPUMCTXCORE, esp),        /* USE_REG_SP */
    116     RT_OFFSETOF(CPUMCTXCORE, ebp),        /* USE_REG_BP */
    117     RT_OFFSETOF(CPUMCTXCORE, esi),        /* USE_REG_SI */
    118     RT_OFFSETOF(CPUMCTXCORE, edi),        /* USE_REG_DI */
    119     RT_OFFSETOF(CPUMCTXCORE, r8),         /* USE_REG_R8W */
    120     RT_OFFSETOF(CPUMCTXCORE, r9),         /* USE_REG_R9W */
    121     RT_OFFSETOF(CPUMCTXCORE, r10),        /* USE_REG_R10W */
    122     RT_OFFSETOF(CPUMCTXCORE, r11),        /* USE_REG_R11W */
    123     RT_OFFSETOF(CPUMCTXCORE, r12),        /* USE_REG_R12W */
    124     RT_OFFSETOF(CPUMCTXCORE, r13),        /* USE_REG_R13W */
    125     RT_OFFSETOF(CPUMCTXCORE, r14),        /* USE_REG_R14W */
    126     RT_OFFSETOF(CPUMCTXCORE, r15)         /* USE_REG_R15W */
     111    RT_OFFSETOF(CPUMCTXCORE, eax),        /* DISGREG_AX */
     112    RT_OFFSETOF(CPUMCTXCORE, ecx),        /* DISGREG_CX */
     113    RT_OFFSETOF(CPUMCTXCORE, edx),        /* DISGREG_DX */
     114    RT_OFFSETOF(CPUMCTXCORE, ebx),        /* DISGREG_BX */
     115    RT_OFFSETOF(CPUMCTXCORE, esp),        /* DISGREG_SP */
     116    RT_OFFSETOF(CPUMCTXCORE, ebp),        /* DISGREG_BP */
     117    RT_OFFSETOF(CPUMCTXCORE, esi),        /* DISGREG_SI */
     118    RT_OFFSETOF(CPUMCTXCORE, edi),        /* DISGREG_DI */
     119    RT_OFFSETOF(CPUMCTXCORE, r8),         /* DISGREG_R8W */
     120    RT_OFFSETOF(CPUMCTXCORE, r9),         /* DISGREG_R9W */
     121    RT_OFFSETOF(CPUMCTXCORE, r10),        /* DISGREG_R10W */
     122    RT_OFFSETOF(CPUMCTXCORE, r11),        /* DISGREG_R11W */
     123    RT_OFFSETOF(CPUMCTXCORE, r12),        /* DISGREG_R12W */
     124    RT_OFFSETOF(CPUMCTXCORE, r13),        /* DISGREG_R13W */
     125    RT_OFFSETOF(CPUMCTXCORE, r14),        /* DISGREG_R14W */
     126    RT_OFFSETOF(CPUMCTXCORE, r15)         /* DISGREG_R15W */
    127127};
    128128
     
    140140static const unsigned g_aReg8Index[] =
    141141{
    142     RT_OFFSETOF(CPUMCTXCORE, eax),        /* USE_REG_AL */
    143     RT_OFFSETOF(CPUMCTXCORE, ecx),        /* USE_REG_CL */
    144     RT_OFFSETOF(CPUMCTXCORE, edx),        /* USE_REG_DL */
    145     RT_OFFSETOF(CPUMCTXCORE, ebx),        /* USE_REG_BL */
    146     RT_OFFSETOF_ADD(CPUMCTXCORE, eax, 1), /* USE_REG_AH */
    147     RT_OFFSETOF_ADD(CPUMCTXCORE, ecx, 1), /* USE_REG_CH */
    148     RT_OFFSETOF_ADD(CPUMCTXCORE, edx, 1), /* USE_REG_DH */
    149     RT_OFFSETOF_ADD(CPUMCTXCORE, ebx, 1), /* USE_REG_BH */
    150     RT_OFFSETOF(CPUMCTXCORE, r8),         /* USE_REG_R8B */
    151     RT_OFFSETOF(CPUMCTXCORE, r9),         /* USE_REG_R9B */
    152     RT_OFFSETOF(CPUMCTXCORE, r10),        /* USE_REG_R10B*/
    153     RT_OFFSETOF(CPUMCTXCORE, r11),        /* USE_REG_R11B */
    154     RT_OFFSETOF(CPUMCTXCORE, r12),        /* USE_REG_R12B */
    155     RT_OFFSETOF(CPUMCTXCORE, r13),        /* USE_REG_R13B */
    156     RT_OFFSETOF(CPUMCTXCORE, r14),        /* USE_REG_R14B */
    157     RT_OFFSETOF(CPUMCTXCORE, r15),        /* USE_REG_R15B */
    158     RT_OFFSETOF(CPUMCTXCORE, esp),        /* USE_REG_SPL; with REX prefix only */
    159     RT_OFFSETOF(CPUMCTXCORE, ebp),        /* USE_REG_BPL; with REX prefix only */
    160     RT_OFFSETOF(CPUMCTXCORE, esi),        /* USE_REG_SIL; with REX prefix only */
    161     RT_OFFSETOF(CPUMCTXCORE, edi)         /* USE_REG_DIL; with REX prefix only */
     142    RT_OFFSETOF(CPUMCTXCORE, eax),        /* DISGREG_AL */
     143    RT_OFFSETOF(CPUMCTXCORE, ecx),        /* DISGREG_CL */
     144    RT_OFFSETOF(CPUMCTXCORE, edx),        /* DISGREG_DL */
     145    RT_OFFSETOF(CPUMCTXCORE, ebx),        /* DISGREG_BL */
     146    RT_OFFSETOF_ADD(CPUMCTXCORE, eax, 1), /* DISGREG_AH */
     147    RT_OFFSETOF_ADD(CPUMCTXCORE, ecx, 1), /* DISGREG_CH */
     148    RT_OFFSETOF_ADD(CPUMCTXCORE, edx, 1), /* DISGREG_DH */
     149    RT_OFFSETOF_ADD(CPUMCTXCORE, ebx, 1), /* DISGREG_BH */
     150    RT_OFFSETOF(CPUMCTXCORE, r8),         /* DISGREG_R8B */
     151    RT_OFFSETOF(CPUMCTXCORE, r9),         /* DISGREG_R9B */
     152    RT_OFFSETOF(CPUMCTXCORE, r10),        /* DISGREG_R10B*/
     153    RT_OFFSETOF(CPUMCTXCORE, r11),        /* DISGREG_R11B */
     154    RT_OFFSETOF(CPUMCTXCORE, r12),        /* DISGREG_R12B */
     155    RT_OFFSETOF(CPUMCTXCORE, r13),        /* DISGREG_R13B */
     156    RT_OFFSETOF(CPUMCTXCORE, r14),        /* DISGREG_R14B */
     157    RT_OFFSETOF(CPUMCTXCORE, r15),        /* DISGREG_R15B */
     158    RT_OFFSETOF(CPUMCTXCORE, esp),        /* DISGREG_SPL; with REX prefix only */
     159    RT_OFFSETOF(CPUMCTXCORE, ebp),        /* DISGREG_BPL; with REX prefix only */
     160    RT_OFFSETOF(CPUMCTXCORE, esi),        /* DISGREG_SIL; with REX prefix only */
     161    RT_OFFSETOF(CPUMCTXCORE, edi)         /* DISGREG_DIL; with REX prefix only */
    162162};
    163163
     
    175175static const unsigned g_aRegSegIndex[] =
    176176{
    177     RT_OFFSETOF(CPUMCTXCORE, es),         /* DIS_SELREG_ES */
    178     RT_OFFSETOF(CPUMCTXCORE, cs),         /* DIS_SELREG_CS */
    179     RT_OFFSETOF(CPUMCTXCORE, ss),         /* DIS_SELREG_SS */
    180     RT_OFFSETOF(CPUMCTXCORE, ds),         /* DIS_SELREG_DS */
    181     RT_OFFSETOF(CPUMCTXCORE, fs),         /* DIS_SELREG_FS */
    182     RT_OFFSETOF(CPUMCTXCORE, gs)          /* DIS_SELREG_GS */
     177    RT_OFFSETOF(CPUMCTXCORE, es),         /* DISSELREG_ES */
     178    RT_OFFSETOF(CPUMCTXCORE, cs),         /* DISSELREG_CS */
     179    RT_OFFSETOF(CPUMCTXCORE, ss),         /* DISSELREG_SS */
     180    RT_OFFSETOF(CPUMCTXCORE, ds),         /* DISSELREG_DS */
     181    RT_OFFSETOF(CPUMCTXCORE, fs),         /* DISSELREG_FS */
     182    RT_OFFSETOF(CPUMCTXCORE, gs)          /* DISSELREG_GS */
    183183};
    184184
    185185static const unsigned g_aRegHidSegIndex[] =
    186186{
    187     RT_OFFSETOF(CPUMCTXCORE, esHid),         /* DIS_SELREG_ES */
    188     RT_OFFSETOF(CPUMCTXCORE, csHid),         /* DIS_SELREG_CS */
    189     RT_OFFSETOF(CPUMCTXCORE, ssHid),         /* DIS_SELREG_SS */
    190     RT_OFFSETOF(CPUMCTXCORE, dsHid),         /* DIS_SELREG_DS */
    191     RT_OFFSETOF(CPUMCTXCORE, fsHid),         /* DIS_SELREG_FS */
    192     RT_OFFSETOF(CPUMCTXCORE, gsHid)          /* DIS_SELREG_GS */
     187    RT_OFFSETOF(CPUMCTXCORE, esHid),         /* DISSELREG_ES */
     188    RT_OFFSETOF(CPUMCTXCORE, csHid),         /* DISSELREG_CS */
     189    RT_OFFSETOF(CPUMCTXCORE, ssHid),         /* DISSELREG_SS */
     190    RT_OFFSETOF(CPUMCTXCORE, dsHid),         /* DISSELREG_DS */
     191    RT_OFFSETOF(CPUMCTXCORE, fsHid),         /* DISSELREG_FS */
     192    RT_OFFSETOF(CPUMCTXCORE, gsHid)          /* DISSELREG_GS */
    193193};
    194194
     
    257257//*****************************************************************************
    258258//*****************************************************************************
    259 DISDECL(DIS_SELREG) DISDetectSegReg(PDISCPUSTATE pCpu, PDISOPPARAM pParam)
     259DISDECL(DISSELREG) DISDetectSegReg(PDISCPUSTATE pCpu, PDISOPPARAM pParam)
    260260{
    261261    if (pCpu->prefix & DISPREFIX_SEG)
    262262        /* Use specified SEG: prefix. */
    263         return (DIS_SELREG)pCpu->idxSegPrefix;
     263        return (DISSELREG)pCpu->idxSegPrefix;
    264264
    265265    /* Guess segment register by parameter type. */
    266266    if (pParam->fUse & (DISUSE_REG_GEN32|DISUSE_REG_GEN64|DISUSE_REG_GEN16))
    267267    {
    268         AssertCompile(USE_REG_ESP == USE_REG_RSP);
    269         AssertCompile(USE_REG_EBP == USE_REG_RBP);
    270         AssertCompile(USE_REG_ESP == USE_REG_SP);
    271         AssertCompile(USE_REG_EBP == USE_REG_BP);
    272         if (pParam->base.reg_gen == USE_REG_ESP || pParam->base.reg_gen == USE_REG_EBP)
    273             return DIS_SELREG_SS;
     268        AssertCompile(DISGREG_ESP == DISGREG_RSP);
     269        AssertCompile(DISGREG_EBP == DISGREG_RBP);
     270        AssertCompile(DISGREG_ESP == DISGREG_SP);
     271        AssertCompile(DISGREG_EBP == DISGREG_BP);
     272        if (pParam->base.reg_gen == DISGREG_ESP || pParam->base.reg_gen == DISGREG_EBP)
     273            return DISSELREG_SS;
    274274    }
    275275    /* Default is use DS: for data access. */
    276     return DIS_SELREG_DS;
     276    return DISSELREG_DS;
    277277}
    278278//*****************************************************************************
     
    283283    switch (pCpu->idxSegPrefix)
    284284    {
    285     case DIS_SELREG_ES:
     285    case DISSELREG_ES:
    286286        return 0x26;
    287     case DIS_SELREG_CS:
     287    case DISSELREG_CS:
    288288        return 0x2E;
    289     case DIS_SELREG_SS:
     289    case DISSELREG_SS:
    290290        return 0x36;
    291     case DIS_SELREG_DS:
     291    case DISSELREG_DS:
    292292        return 0x3E;
    293     case DIS_SELREG_FS:
     293    case DISSELREG_FS:
    294294        return 0x64;
    295     case DIS_SELREG_GS:
     295    case DISSELREG_GS:
    296296        return 0x65;
    297297    default:
     
    402402 *
    403403 */
    404 DISDECL(int) DISFetchRegSeg(PCCPUMCTXCORE pCtx, DIS_SELREG sel, RTSEL *pVal)
     404DISDECL(int) DISFetchRegSeg(PCCPUMCTXCORE pCtx, DISSELREG sel, RTSEL *pVal)
    405405{
    406406    AssertReturn((unsigned)sel < RT_ELEMENTS(g_aRegSegIndex), VERR_INVALID_PARAMETER);
     
    415415 *
    416416 */
    417 DISDECL(int) DISFetchRegSegEx(PCCPUMCTXCORE pCtx, DIS_SELREG sel, RTSEL *pVal, CPUMSELREGHID **ppSelHidReg)
     417DISDECL(int) DISFetchRegSegEx(PCCPUMCTXCORE pCtx, DISSELREG sel, RTSEL *pVal, CPUMSELREGHID **ppSelHidReg)
    418418{
    419419    AssertReturn((unsigned)sel < RT_ELEMENTS(g_aRegSegIndex), VERR_INVALID_PARAMETER);
     
    477477 *
    478478 */
    479 DISDECL(int) DISWriteRegSeg(PCPUMCTXCORE pCtx, DIS_SELREG sel, RTSEL val)
     479DISDECL(int) DISWriteRegSeg(PCPUMCTXCORE pCtx, DISSELREG sel, RTSEL val)
    480480{
    481481    AssertReturn((unsigned)sel < RT_ELEMENTS(g_aRegSegIndex), VERR_INVALID_PARAMETER);
  • trunk/src/VBox/VMM/VMMAll/EMAll.cpp

    r41692 r41727  
    399399{
    400400    RTGCPTR GCPtrInstr;
    401     int rc = SELMToFlatEx(pVCpu, DIS_SELREG_CS, pCtxCore, pCtxCore->rip, 0, &GCPtrInstr);
     401    int rc = SELMToFlatEx(pVCpu, DISSELREG_CS, pCtxCore, pCtxCore->rip, 0, &GCPtrInstr);
    402402    if (RT_FAILURE(rc))
    403403    {
     
    498498#else
    499499    RTGCPTR pbCode;
    500     VBOXSTRICTRC rc = SELMToFlatEx(pVCpu, DIS_SELREG_CS, pRegFrame, pRegFrame->rip, 0, &pbCode);
     500    VBOXSTRICTRC rc = SELMToFlatEx(pVCpu, DISSELREG_CS, pRegFrame, pRegFrame->rip, 0, &pbCode);
    501501    if (RT_SUCCESS(rc))
    502502    {
     
    552552#else
    553553    RTGCPTR pbCode;
    554     VBOXSTRICTRC rc = SELMToFlatEx(pVCpu, DIS_SELREG_CS, pRegFrame, pRegFrame->rip, 0, &pbCode);
     554    VBOXSTRICTRC rc = SELMToFlatEx(pVCpu, DISSELREG_CS, pRegFrame, pRegFrame->rip, 0, &pbCode);
    555555    if (RT_SUCCESS(rc))
    556556    {
     
    735735DECLINLINE(RTGCPTR) emConvertToFlatAddr(PVM pVM, PCPUMCTXCORE pRegFrame, PDISCPUSTATE pDis, PDISOPPARAM pParam, RTGCPTR pvAddr)
    736736{
    737     DIS_SELREG enmPrefixSeg = DISDetectSegReg(pDis, pParam);
     737    DISSELREG enmPrefixSeg = DISDetectSegReg(pDis, pParam);
    738738    return SELMToFlat(pVM, enmPrefixSeg, pRegFrame, pvAddr);
    739739}
     
    10321032
    10331033            /* Convert address; don't bother checking limits etc, as we only read here */
    1034             pStackVal = SELMToFlat(pVM, DIS_SELREG_SS, pRegFrame, (RTGCPTR)pRegFrame->esp);
     1034            pStackVal = SELMToFlat(pVM, DISSELREG_SS, pRegFrame, (RTGCPTR)pRegFrame->esp);
    10351035            if (pStackVal == 0)
    10361036                return VERR_EM_INTERPRETER;
     
    10481048
    10491049                /* pop [esp+xx] uses esp after the actual pop! */
    1050                 AssertCompile(USE_REG_ESP == USE_REG_SP);
     1050                AssertCompile(DISGREG_ESP == DISGREG_SP);
    10511051                if (    (pDis->param1.fUse & DISUSE_BASE)
    10521052                    &&  (pDis->param1.fUse & (DISUSE_REG_GEN16|DISUSE_REG_GEN32))
    1053                     &&  pDis->param1.base.reg_gen == USE_REG_ESP
     1053                    &&  pDis->param1.base.reg_gen == DISGREG_ESP
    10541054                   )
    10551055                   pParam1 = (RTGCPTR)((RTGCUINTPTR)pParam1 + param1.size);
     
    16741674    }
    16751675
    1676     GCDest = SELMToFlat(pVM, DIS_SELREG_ES, pRegFrame, GCOffset);
     1676    GCDest = SELMToFlat(pVM, DISSELREG_ES, pRegFrame, GCOffset);
    16771677    switch (pDis->opmode)
    16781678    {
     
    26862686
    26872687    Assert(pRegFrame->eflags.u32 & X86_EFL_IF);
    2688     Assert(pvFault == SELMToFlat(pVM, DIS_SELREG_CS, pRegFrame, (RTGCPTR)pRegFrame->rip));
     2688    Assert(pvFault == SELMToFlat(pVM, DISSELREG_CS, pRegFrame, (RTGCPTR)pRegFrame->rip));
    26892689
    26902690    pVCpu->em.s.GCPtrInhibitInterrupts = pRegFrame->eip + pDis->opsize;
  • trunk/src/VBox/VMM/VMMAll/IOMAll.cpp

    r41692 r41727  
    137137        {
    138138            *pcbSize  = 2;
    139             DISFetchRegSeg(pRegFrame, (DIS_SELREG)pParam->base.reg_seg, (RTSEL *)pu64Data);
     139            DISFetchRegSeg(pRegFrame, (DISSELREG)pParam->base.reg_seg, (RTSEL *)pu64Data);
    140140            return true;
    141141        } /* Else - error. */
     
    193193    if (pParam->fUse & DISUSE_REG_SEG)
    194194    {
    195         DISWriteRegSeg(pRegFrame, (DIS_SELREG)pParam->base.reg_seg, (RTSEL)u64Data);
     195        DISWriteRegSeg(pRegFrame, (DISSELREG)pParam->base.reg_seg, (RTSEL)u64Data);
    196196        return true;
    197197    }
  • trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp

    r41692 r41727  
    728728        /* Convert source address ds:esi. */
    729729        RTGCUINTPTR pu8Virt;
    730         rc = SELMToFlatEx(pVM, DIS_SELREG_DS, pRegFrame, (RTGCPTR)pRegFrame->rsi,
     730        rc = SELMToFlatEx(pVM, DISSELREG_DS, pRegFrame, (RTGCPTR)pRegFrame->rsi,
    731731                          SELMTOFLAT_FLAGS_HYPER | SELMTOFLAT_FLAGS_NO_PL,
    732732                          (PRTGCPTR)&pu8Virt);
     
    787787        /* Convert destination address. */
    788788        RTGCUINTPTR pu8Virt;
    789         rc = SELMToFlatEx(pVM, DIS_SELREG_ES, pRegFrame, (RTGCPTR)pRegFrame->rdi,
     789        rc = SELMToFlatEx(pVM, DISSELREG_ES, pRegFrame, (RTGCPTR)pRegFrame->rdi,
    790790                          SELMTOFLAT_FLAGS_HYPER | SELMTOFLAT_FLAGS_NO_PL,
    791791                          (RTGCPTR *)&pu8Virt);
     
    20552055    /* Convert destination address es:edi. */
    20562056    RTGCPTR GCPtrDst;
    2057     int rc2 = SELMToFlatEx(pVCpu, DIS_SELREG_ES, pRegFrame, pRegFrame->rdi & fAddrMask,
     2057    int rc2 = SELMToFlatEx(pVCpu, DISSELREG_ES, pRegFrame, pRegFrame->rdi & fAddrMask,
    20582058                           SELMTOFLAT_FLAGS_HYPER | SELMTOFLAT_FLAGS_NO_PL,
    20592059                           &GCPtrDst);
     
    22172217    /* Convert source address ds:esi. */
    22182218    RTGCPTR GCPtrSrc;
    2219     int rc2 = SELMToFlatEx(pVCpu, DIS_SELREG_DS, pRegFrame, pRegFrame->rsi & fAddrMask,
     2219    int rc2 = SELMToFlatEx(pVCpu, DISSELREG_DS, pRegFrame, pRegFrame->rsi & fAddrMask,
    22202220                           SELMTOFLAT_FLAGS_HYPER | SELMTOFLAT_FLAGS_NO_PL,
    22212221                           &GCPtrSrc);
  • trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp

    r41678 r41727  
    806806    if (    (    (pDis->param1.fUse & DISUSE_REG_GEN32)
    807807             ||  (pDis->param1.fUse & DISUSE_REG_GEN64))
    808         &&  (pDis->param1.base.reg_gen == USE_REG_ESP))
     808        &&  (pDis->param1.base.reg_gen == DISGREG_ESP))
    809809    {
    810810        Log4(("pgmPoolMonitorIsReused: ESP\n"));
  • trunk/src/VBox/VMM/VMMAll/SELMAll.cpp

    r41675 r41727  
    8282 * @param   Addr        Address part.
    8383 */
    84 VMMDECL(RTGCPTR) SELMToFlat(PVM pVM, DIS_SELREG SelReg, PCPUMCTXCORE pCtxCore, RTGCPTR Addr)
     84VMMDECL(RTGCPTR) SELMToFlat(PVM pVM, DISSELREG SelReg, PCPUMCTXCORE pCtxCore, RTGCPTR Addr)
    8585{
    8686    PCPUMSELREGHID pHiddenSel;
     
    119119        switch (SelReg)
    120120        {
    121             case DIS_SELREG_FS:
    122             case DIS_SELREG_GS:
     121            case DISSELREG_FS:
     122            case DISSELREG_GS:
    123123                return (RTGCPTR)(pHiddenSel->u64Base + Addr);
    124124
     
    148148 * @param   ppvGC       Where to store the GC flat address.
    149149 */
    150 VMMDECL(int) SELMToFlatEx(PVMCPU pVCpu, DIS_SELREG SelReg, PCCPUMCTXCORE pCtxCore, RTGCPTR Addr, unsigned fFlags, PRTGCPTR ppvGC)
     150VMMDECL(int) SELMToFlatEx(PVMCPU pVCpu, DISSELREG SelReg, PCCPUMCTXCORE pCtxCore, RTGCPTR Addr, unsigned fFlags, PRTGCPTR ppvGC)
    151151{
    152152    /*
     
    202202            switch (SelReg)
    203203            {
    204                 case DIS_SELREG_FS:
    205                 case DIS_SELREG_GS:
     204                case DISSELREG_FS:
     205                case DISSELREG_GS:
    206206                    pvFlat = (pHiddenSel->u64Base + Addr);
    207207                    break;
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r41692 r41727  
    35963596                        }
    35973597
    3598                         rc2 = SELMToFlatEx(pVCpu, DIS_SELREG_SS, CPUMCTX2CORE(pCtx), pCtx->esp & uMask, 0, &GCPtrStack);
     3598                        rc2 = SELMToFlatEx(pVCpu, DISSELREG_SS, CPUMCTX2CORE(pCtx), pCtx->esp & uMask, 0, &GCPtrStack);
    35993599                        if (RT_FAILURE(rc2))
    36003600                        {
     
    36383638                        }
    36393639
    3640                         rc2 = SELMToFlatEx(pVCpu, DIS_SELREG_SS, CPUMCTX2CORE(pCtx), (pCtx->esp - cbParm) & uMask, 0,
     3640                        rc2 = SELMToFlatEx(pVCpu, DISSELREG_SS, CPUMCTX2CORE(pCtx), (pCtx->esp - cbParm) & uMask, 0,
    36413641                                           &GCPtrStack);
    36423642                        if (RT_FAILURE(rc2))
     
    36753675                        }
    36763676
    3677                         rc2 = SELMToFlatEx(pVCpu, DIS_SELREG_SS, CPUMCTX2CORE(pCtx), pCtx->esp & uMask, 0, &GCPtrStack);
     3677                        rc2 = SELMToFlatEx(pVCpu, DISSELREG_SS, CPUMCTX2CORE(pCtx), pCtx->esp & uMask, 0, &GCPtrStack);
    36783678                        if (RT_FAILURE(rc2))
    36793679                        {
  • trunk/src/VBox/VMM/VMMR3/CSAM.cpp

    r41678 r41727  
    22632263        Assert(SELMGetCpuModeFromSelector(VMMGetCpu0(pVM), pCtxCore->eflags, pCtxCore->cs, &pCtxCore->csHid) == DISCPUMODE_32BIT);
    22642264
    2265         pInstrGC = SELMToFlat(pVM, DIS_SELREG_CS, pCtxCore, pInstrGC);
     2265        pInstrGC = SELMToFlat(pVM, DISSELREG_CS, pCtxCore, pInstrGC);
    22662266        return CSAMR3CheckCode(pVM, pInstrGC);
    22672267    }
  • trunk/src/VBox/VMM/VMMR3/DBGFDisas.cpp

    r41675 r41727  
    283283
    284284    if (   DIS_FMT_SEL_IS_REG(u32Sel)
    285         ?  DIS_FMT_SEL_GET_REG(u32Sel) == DIS_SELREG_CS
     285        ?  DIS_FMT_SEL_GET_REG(u32Sel) == DISSELREG_CS
    286286        :  pSelInfo->Sel == DIS_FMT_SEL_GET_VALUE(u32Sel))
    287287    {
  • trunk/src/VBox/VMM/VMMR3/EMHwaccm.cpp

    r41675 r41727  
    408408        /* Prefetch pages for EIP and ESP. */
    409409        /** @todo This is rather expensive. Should investigate if it really helps at all. */
    410         rc = PGMPrefetchPage(pVCpu, SELMToFlat(pVM, DIS_SELREG_CS, CPUMCTX2CORE(pCtx), pCtx->rip));
     410        rc = PGMPrefetchPage(pVCpu, SELMToFlat(pVM, DISSELREG_CS, CPUMCTX2CORE(pCtx), pCtx->rip));
    411411        if (rc == VINF_SUCCESS)
    412             rc = PGMPrefetchPage(pVCpu, SELMToFlat(pVM, DIS_SELREG_SS, CPUMCTX2CORE(pCtx), pCtx->rsp));
     412            rc = PGMPrefetchPage(pVCpu, SELMToFlat(pVM, DISSELREG_SS, CPUMCTX2CORE(pCtx), pCtx->rsp));
    413413        if (rc != VINF_SUCCESS)
    414414        {
  • trunk/src/VBox/VMM/VMMR3/EMRaw.cpp

    r41678 r41727  
    683683            if (pCtx->SysEnter.cs != 0)
    684684            {
    685                 rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, DIS_SELREG_CS, CPUMCTX2CORE(pCtx), pCtx->eip),
     685                rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, DISSELREG_CS, CPUMCTX2CORE(pCtx), pCtx->eip),
    686686                                        (SELMGetCpuModeFromSelector(pVCpu, pCtx->eflags, pCtx->cs, &pCtx->csHid) == DISCPUMODE_32BIT) ? PATMFL_CODE32 : 0);
    687687                if (RT_SUCCESS(rc))
     
    933933            && !PATMIsPatchGCAddr(pVM, pCtx->eip))
    934934        {
    935             int rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, DIS_SELREG_CS, CPUMCTX2CORE(pCtx), pCtx->eip),
     935            int rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, DISSELREG_CS, CPUMCTX2CORE(pCtx), pCtx->eip),
    936936                                        (SELMGetCpuModeFromSelector(pVCpu, pCtx->eflags, pCtx->cs, &pCtx->csHid) == DISCPUMODE_32BIT) ? PATMFL_CODE32 : 0);
    937937            if (RT_SUCCESS(rc))
     
    12771277        /* Prefetch pages for EIP and ESP. */
    12781278        /** @todo This is rather expensive. Should investigate if it really helps at all. */
    1279         rc = PGMPrefetchPage(pVCpu, SELMToFlat(pVM, DIS_SELREG_CS, CPUMCTX2CORE(pCtx), pCtx->rip));
     1279        rc = PGMPrefetchPage(pVCpu, SELMToFlat(pVM, DISSELREG_CS, CPUMCTX2CORE(pCtx), pCtx->rip));
    12801280        if (rc == VINF_SUCCESS)
    1281             rc = PGMPrefetchPage(pVCpu, SELMToFlat(pVM, DIS_SELREG_SS, CPUMCTX2CORE(pCtx), pCtx->rsp));
     1281            rc = PGMPrefetchPage(pVCpu, SELMToFlat(pVM, DISSELREG_SS, CPUMCTX2CORE(pCtx), pCtx->rsp));
    12821282        if (rc != VINF_SUCCESS)
    12831283        {
  • trunk/src/VBox/VMM/VMMR3/HWACCM.cpp

    r41678 r41727  
    20282028                *
    20292029                */
    2030             bool fUsesEax = (pDis->param2.fUse == DISUSE_REG_GEN32 && pDis->param2.base.reg_gen == USE_REG_EAX);
     2030            bool fUsesEax = (pDis->param2.fUse == DISUSE_REG_GEN32 && pDis->param2.base.reg_gen == DISGREG_EAX);
    20312031
    20322032            aPatch[off++] = 0x51;    /* push ecx */
     
    20412041                {
    20422042                    aPatch[off++] = 0x89;    /* mov eax, src_reg */
    2043                     aPatch[off++] = MAKE_MODRM(3, pDis->param2.base.reg_gen, USE_REG_EAX);
     2043                    aPatch[off++] = MAKE_MODRM(3, pDis->param2.base.reg_gen, DISGREG_EAX);
    20442044                }
    20452045            }
     
    20812081            Assert(pDis->param1.fUse == DISUSE_REG_GEN32);
    20822082
    2083             if (pDis->param1.base.reg_gen != USE_REG_ECX)
     2083            if (pDis->param1.base.reg_gen != DISGREG_ECX)
    20842084                aPatch[off++] = 0x51;    /* push ecx */
    2085             if (pDis->param1.base.reg_gen != USE_REG_EDX)
     2085            if (pDis->param1.base.reg_gen != DISGREG_EDX )
    20862086                aPatch[off++] = 0x52;    /* push edx */
    2087             if (pDis->param1.base.reg_gen != USE_REG_EAX)
     2087            if (pDis->param1.base.reg_gen != DISGREG_EAX)
    20882088                aPatch[off++] = 0x50;    /* push eax */
    20892089
     
    20982098            aPatch[off++] = 0x32;
    20992099
    2100             if (pDis->param1.base.reg_gen != USE_REG_EAX)
     2100            if (pDis->param1.base.reg_gen != DISGREG_EAX)
    21012101            {
    21022102                aPatch[off++] = 0x89;    /* mov dst_reg, eax */
    2103                 aPatch[off++] = MAKE_MODRM(3, USE_REG_EAX, pDis->param1.base.reg_gen);
     2103                aPatch[off++] = MAKE_MODRM(3, DISGREG_EAX, pDis->param1.base.reg_gen);
    21042104            }
    21052105
    2106             if (pDis->param1.base.reg_gen != USE_REG_EAX)
     2106            if (pDis->param1.base.reg_gen != DISGREG_EAX)
    21072107                aPatch[off++] = 0x58;    /* pop eax */
    2108             if (pDis->param1.base.reg_gen != USE_REG_EDX)
     2108            if (pDis->param1.base.reg_gen != DISGREG_EDX )
    21092109                aPatch[off++] = 0x5A;    /* pop edx */
    2110             if (pDis->param1.base.reg_gen != USE_REG_ECX)
     2110            if (pDis->param1.base.reg_gen != DISGREG_ECX)
    21112111                aPatch[off++] = 0x59;    /* pop ecx */
    21122112        }
  • trunk/src/VBox/VMM/VMMR3/PATM.cpp

    r41681 r41727  
    17491749            /* mov ss, src? */
    17501750            if (    (pCpu->param1.fUse & DISUSE_REG_SEG)
    1751                 &&  (pCpu->param1.base.reg_seg == DIS_SELREG_SS))
     1751                &&  (pCpu->param1.base.reg_seg == DISSELREG_SS))
    17521752            {
    17531753                Log(("Force recompilation of next instruction for OP_MOV at %RRv\n", pCurInstrGC));
     
    34863486
    34873487    pBranchTarget = pCtx->edx;
    3488     pBranchTarget = SELMToFlat(pVM, DIS_SELREG_CS, CPUMCTX2CORE(pCtx), pBranchTarget);
     3488    pBranchTarget = SELMToFlat(pVM, DISSELREG_CS, CPUMCTX2CORE(pCtx), pBranchTarget);
    34893489
    34903490    /* First we check if the duplicate function target lies in some existing function patch already. Will save some space. */
     
    40684068    if (CPUMGetGuestCPL(pVCpu, CPUMCTX2CORE(pCtx)) == 0)
    40694069    {
    4070         RTRCPTR pInstrGCFlat = SELMToFlat(pVM, DIS_SELREG_CS, CPUMCTX2CORE(pCtx), pInstrGC);
     4070        RTRCPTR pInstrGCFlat = SELMToFlat(pVM, DISSELREG_CS, CPUMCTX2CORE(pCtx), pInstrGC);
    40714071        if (pInstrGCFlat != pInstrGC)
    40724072        {
     
    63086308
    63096309                    /* continue at the original instruction */
    6310                     *ppNewEip = pNewEip - SELMToFlat(pVM, DIS_SELREG_CS, CPUMCTX2CORE(pCtx), 0);
     6310                    *ppNewEip = pNewEip - SELMToFlat(pVM, DISSELREG_CS, CPUMCTX2CORE(pCtx), 0);
    63116311                    STAM_PROFILE_ADV_STOP(&pVM->patm.s.StatHandleTrap, a);
    63126312                    return VINF_SUCCESS;
     
    63436343
    63446344            /* continue at the original instruction */
    6345             *ppNewEip = pNewEip - SELMToFlat(pVM, DIS_SELREG_CS, CPUMCTX2CORE(pCtx), 0);
     6345            *ppNewEip = pNewEip - SELMToFlat(pVM, DISSELREG_CS, CPUMCTX2CORE(pCtx), 0);
    63466346            STAM_PROFILE_ADV_STOP(&pVM->patm.s.StatHandleTrap, a);
    63476347            return VINF_SUCCESS;
     
    63926392        }
    63936393
    6394         *ppNewEip = pNewEip - SELMToFlat(pVM, DIS_SELREG_CS, CPUMCTX2CORE(pCtx), 0);
     6394        *ppNewEip = pNewEip - SELMToFlat(pVM, DISSELREG_CS, CPUMCTX2CORE(pCtx), 0);
    63956395        STAM_PROFILE_ADV_STOP(&pVM->patm.s.StatHandleTrap, a);
    63966396        return rc;
     
    64296429
    64306430    /* Return original address, correct by subtracting the CS base address. */
    6431     *ppNewEip = pNewEip - SELMToFlat(pVM, DIS_SELREG_CS, CPUMCTX2CORE(pCtx), 0);
     6431    *ppNewEip = pNewEip - SELMToFlat(pVM, DISSELREG_CS, CPUMCTX2CORE(pCtx), 0);
    64326432
    64336433    /* Reset the PATM stack. */
  • trunk/src/VBox/VMM/VMMR3/PATMPatch.cpp

    r41692 r41727  
    424424    rc = patmPatchReadBytes(pVM, pPB, pCurInstrGC, cbInstrShutUpGcc);
    425425    AssertRC(rc);
    426     PATCHGEN_EPILOG(pPatch, cbInstrShutUpGcc); 
     426    PATCHGEN_EPILOG(pPatch, cbInstrShutUpGcc);
    427427    return rc;
    428428}
     
    13671367        pPB[offset++] = 0x8D;              // lea       edx, dword ptr [dest]
    13681368        // duplicate and modify modrm byte and additional bytes if present (e.g. direct address)
    1369         pPB[offset++] = MAKE_MODRM(pCpu->ModRM.Bits.Mod, USE_REG_EDX, pCpu->ModRM.Bits.Rm);
     1369        pPB[offset++] = MAKE_MODRM(pCpu->ModRM.Bits.Mod, DISGREG_EDX , pCpu->ModRM.Bits.Rm);
    13701370
    13711371        i = 3;  /* standard offset of modrm bytes */
     
    14621462    pPB[offset++] = 0x8D;              // lea       edx, dword ptr [dest]
    14631463    // duplicate and modify modrm byte and additional bytes if present (e.g. direct address)
    1464     pPB[offset++] = MAKE_MODRM(pCpu->ModRM.Bits.Mod, USE_REG_EDX, pCpu->ModRM.Bits.Rm);
     1464    pPB[offset++] = MAKE_MODRM(pCpu->ModRM.Bits.Mod, DISGREG_EDX , pCpu->ModRM.Bits.Rm);
    14651465
    14661466    i = 3;  /* standard offset of modrm bytes */
  • trunk/src/VBox/VMM/include/EMHandleRCTmpl.h

    r41675 r41727  
    111111         */
    112112        case VINF_PATM_HC_MMIO_PATCH_READ:
    113             rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, DIS_SELREG_CS, CPUMCTX2CORE(pCtx), pCtx->eip),
     113            rc = PATMR3InstallPatch(pVM, SELMToFlat(pVM, DISSELREG_CS, CPUMCTX2CORE(pCtx), pCtx->eip),
    114114                                    PATMFL_MMIO_ACCESS | ((SELMGetCpuModeFromSelector(pVCpu, pCtx->eflags, pCtx->cs, &pCtx->csHid) == DISCPUMODE_32BIT) ? PATMFL_CODE32 : 0));
    115115            if (RT_FAILURE(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