Changeset 41744 in vbox
- Timestamp:
- Jun 15, 2012 2:29:09 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/dis.h
r41743 r41744 194 194 /** @name 64-bit general register indexes. 195 195 * This matches the AMD64 register encoding. It is found used in 196 * DISOPPARAM:: base.reg_genand DISOPPARAM::Index.idxGenReg.196 * DISOPPARAM::Base.idxGenReg and DISOPPARAM::Index.idxGenReg. 197 197 * @note Safe to assume same values as the 16-bit and 32-bit general registers. 198 198 * @{ … … 218 218 /** @name 32-bit general register indexes. 219 219 * This matches the AMD64 register encoding. It is found used in 220 * DISOPPARAM:: base.reg_genand DISOPPARAM::Index.idxGenReg.220 * DISOPPARAM::Base.idxGenReg and DISOPPARAM::Index.idxGenReg. 221 221 * @note Safe to assume same values as the 16-bit and 64-bit general registers. 222 222 * @{ … … 242 242 /** @name 16-bit general register indexes. 243 243 * This matches the AMD64 register encoding. It is found used in 244 * DISOPPARAM:: base.reg_genand DISOPPARAM::Index.idxGenReg.244 * DISOPPARAM::Base.idxGenReg and DISOPPARAM::Index.idxGenReg. 245 245 * @note Safe to assume same values as the 32-bit and 64-bit general registers. 246 246 * @{ … … 266 266 /** @name 8-bit general register indexes. 267 267 * This mostly (?) matches the AMD64 register encoding. It is found used in 268 * DISOPPARAM:: base.reg_genand DISOPPARAM::Index.idxGenReg.268 * DISOPPARAM::Base.idxGenReg and DISOPPARAM::Index.idxGenReg. 269 269 * @{ 270 270 */ … … 293 293 /** @name Segment registerindexes. 294 294 * This matches the AMD64 register encoding. It is found used in 295 * DISOPPARAM:: base.reg_seg.295 * DISOPPARAM::Base.idxSegReg. 296 296 * @{ 297 297 */ … … 311 311 /** @name FPU register indexes. 312 312 * This matches the AMD64 register encoding. It is found used in 313 * DISOPPARAM:: base.reg_fp.313 * DISOPPARAM::Base.idxFpuReg. 314 314 * @{ 315 315 */ … … 326 326 /** @name Control register indexes. 327 327 * This matches the AMD64 register encoding. It is found used in 328 * DISOPPARAM:: base.reg_ctrl.328 * DISOPPARAM::Base.idxCtrlReg. 329 329 * @{ 330 330 */ … … 339 339 /** @name Debug register indexes. 340 340 * This matches the AMD64 register encoding. It is found used in 341 * DISOPPARAM:: base.reg_dbg.341 * DISOPPARAM::Base.idxDbgReg. 342 342 * @{ 343 343 */ … … 354 354 /** @name MMX register indexes. 355 355 * This matches the AMD64 register encoding. It is found used in 356 * DISOPPARAM:: base.reg_mmx.356 * DISOPPARAM::Base.idxMmxReg. 357 357 * @{ 358 358 */ … … 369 369 /** @name SSE register indexes. 370 370 * This matches the AMD64 register encoding. It is found used in 371 * DISOPPARAM:: base.reg_xmm.371 * DISOPPARAM::Base.idxXmmReg. 372 372 * @{ 373 373 */ … … 380 380 #define DISXREG_XMM6 UINT8_C(6) 381 381 #define DISXREG_XMM7 UINT8_C(7) 382 /** @} 382 /** @} */ 383 383 384 384 … … 388 388 typedef struct DISOPPARAM 389 389 { 390 /** Immediate value or address, if used. */391 uint64_t uValue;392 390 /** A combination of DISUSE_XXX. */ 393 391 uint64_t fUse; 392 /** Immediate value or address, applicable if any of the flags included in 393 * DISUSE_IMMEDIATE are set in fUse. */ 394 uint64_t uValue; 395 /** Disposition. */ 394 396 union 395 397 { 398 /** 64-bit displacement, applicable if DISUSE_DISPLACEMENT64 is set in fUse. */ 396 399 int64_t i64; 400 uint64_t u64; 401 /** 32-bit displacement, applicable if DISUSE_DISPLACEMENT32 or 402 * DISUSE_RIPDISPLACEMENT32 is set in fUse. */ 397 403 int32_t i32; 404 uint32_t u32; 405 /** 16-bit displacement, applicable if DISUSE_DISPLACEMENT16 is set in fUse. */ 398 406 int32_t i16; 407 uint32_t u16; 408 /** 8-bit displacement, applicable if DISUSE_DISPLACEMENT8 is set in fUse. */ 399 409 int32_t i8; 400 uint64_t u64;401 uint32_t u32;402 uint32_t u16;403 410 uint32_t u8; 404 411 } uDisp; 405 /** Copy of the corresponding DISOPCODE::fParam1 / DISOPCODE::fParam2 / 406 * DISOPCODE::fParam3. */ 407 uint32_t fParam; 408 412 /** The base register from ModR/M or SIB, applicable if DISUSE_BASE is 413 * set in fUse. */ 409 414 union 410 415 { 411 /** DISGREG_XXX. */ 412 uint8_t reg_gen; 413 /** DISFPREG_XXX */ 414 uint8_t reg_fp; 415 /** DISMREG_XXX. */ 416 uint8_t reg_mmx; 417 /** DISXREG_XXX. */ 418 uint8_t reg_xmm; 419 /** DISSELREG_XXX. */ 420 uint8_t reg_seg; 421 /** TR0-TR7 (no defines for these). */ 422 uint8_t reg_test; 423 /** DISCREG_XXX */ 424 uint8_t reg_ctrl; 425 /** DISDREG_XXX */ 426 uint8_t reg_dbg; 427 } base; 416 /** General register index (DISGREG_XXX), applicable if DISUSE_REG_GEN8, 417 * DISUSE_REG_GEN16, DISUSE_REG_GEN32 or DISUSE_REG_GEN64 is set in fUse. */ 418 uint8_t idxGenReg; 419 /** FPU stack register index (DISFPREG_XXX), applicable if DISUSE_REG_FP is 420 * set in fUse. 1:1 indexes. */ 421 uint8_t idxFpuReg; 422 /** MMX register index (DISMREG_XXX), applicable if DISUSE_REG_MMX is 423 * set in fUse. 1:1 indexes. */ 424 uint8_t idxMmxReg; 425 /** SSE register index (DISXREG_XXX), applicable if DISUSE_REG_XMM is 426 * set in fUse. 1:1 indexes. */ 427 uint8_t idxXmmReg; 428 /** Segment register index (DISSELREG_XXX), applicable if DISUSE_REG_SEG is 429 * set in fUse. */ 430 uint8_t idxSegReg; 431 /** Test register, TR0-TR7, present on early IA32 CPUs, applicable if 432 * DISUSE_REG_TEST is set in fUse. No index defines for these. */ 433 uint8_t idxTestReg; 434 /** Control register index (DISCREG_XXX), applicable if DISUSE_REG_CR is 435 * set in fUse. 1:1 indexes. */ 436 uint8_t idxCtrlReg; 437 /** Debug register index (DISDREG_XXX), applicable if DISUSE_REG_DBG is 438 * set in fUse. 1:1 indexes. */ 439 uint8_t idxDbgReg; 440 } Base; 428 441 /** The SIB index register meaning, applicable if DISUSE_INDEX is 429 442 * set in fUse. */ … … 438 451 /** Parameter size. */ 439 452 uint8_t cb; 453 /** Copy of the corresponding DISOPCODE::fParam1 / DISOPCODE::fParam2 / 454 * DISOPCODE::fParam3. */ 455 uint32_t fParam; 440 456 } DISOPPARAM; 441 457 AssertCompileSize(DISOPPARAM, 32); -
trunk/src/VBox/Disassembler/DisasmCore.cpp
r41743 r41744 643 643 { 644 644 pParam->fUse |= DISUSE_BASE | regtype; 645 pParam-> base.reg_gen= base;645 pParam->Base.idxGenReg = base; 646 646 } 647 647 return; /* Already fetched everything in ParseSIB; no size returned */ … … 742 742 { 743 743 pCpu->fPrefix &= ~DISPREFIX_LOCK; 744 pParam-> base.reg_ctrl= DISCREG_CR8;744 pParam->Base.idxCtrlReg = DISCREG_CR8; 745 745 } 746 746 else 747 pParam-> base.reg_ctrl= reg;747 pParam->Base.idxCtrlReg = reg; 748 748 return 0; 749 749 750 750 case OP_PARM_D: //debug register 751 751 pParam->fUse |= DISUSE_REG_DBG; 752 pParam-> base.reg_dbg = reg;752 pParam->Base.idxDbgReg = reg; 753 753 return 0; 754 754 … … 756 756 reg &= 7; /* REX.R has no effect here */ 757 757 pParam->fUse |= DISUSE_REG_MMX; 758 pParam-> base.reg_mmx= reg;758 pParam->Base.idxMmxReg = reg; 759 759 return 0; 760 760 … … 768 768 reg &= 7; /* REX.R has no effect here */ 769 769 pParam->fUse |= DISUSE_REG_TEST; 770 pParam-> base.reg_test= reg;770 pParam->Base.idxTestReg = reg; 771 771 return 0; 772 772 … … 779 779 case OP_PARM_V: //XMM register 780 780 pParam->fUse |= DISUSE_REG_XMM; 781 pParam-> base.reg_xmm= reg;781 pParam->Base.idxXmmReg = reg; 782 782 return 0; 783 783 } … … 1559 1559 { 1560 1560 /* Use 32-bit registers. */ 1561 pParam-> base.reg_gen= pParam->fParam - OP_PARM_REG_GEN32_START;1561 pParam->Base.idxGenReg = pParam->fParam - OP_PARM_REG_GEN32_START; 1562 1562 pParam->fUse |= DISUSE_REG_GEN32; 1563 1563 pParam->cb = 4; … … 1567 1567 { 1568 1568 /* Use 64-bit registers. */ 1569 pParam-> base.reg_gen= pParam->fParam - OP_PARM_REG_GEN32_START;1569 pParam->Base.idxGenReg = pParam->fParam - OP_PARM_REG_GEN32_START; 1570 1570 if ( (pOp->fOpType & DISOPTYPE_REXB_EXTENDS_OPREG) 1571 1571 && pParam == &pCpu->Param1 /* ugly assumption that it only applies to the first parameter */ 1572 1572 && (pCpu->fPrefix & DISPREFIX_REX) 1573 1573 && (pCpu->fRexPrefix & DISPREFIX_REX_FLAGS)) 1574 pParam-> base.reg_gen+= 8;1574 pParam->Base.idxGenReg += 8; 1575 1575 1576 1576 pParam->fUse |= DISUSE_REG_GEN64; … … 1580 1580 { 1581 1581 /* Use 16-bit registers. */ 1582 pParam-> base.reg_gen= pParam->fParam - OP_PARM_REG_GEN32_START;1582 pParam->Base.idxGenReg = pParam->fParam - OP_PARM_REG_GEN32_START; 1583 1583 pParam->fUse |= DISUSE_REG_GEN16; 1584 1584 pParam->cb = 2; … … 1590 1590 { 1591 1591 /* Segment ES..GS registers. */ 1592 pParam-> base.reg_seg = (DISSELREG)(pParam->fParam - OP_PARM_REG_SEG_START);1592 pParam->Base.idxSegReg = (DISSELREG)(pParam->fParam - OP_PARM_REG_SEG_START); 1593 1593 pParam->fUse |= DISUSE_REG_SEG; 1594 1594 pParam->cb = 2; … … 1598 1598 { 1599 1599 /* 16-bit AX..DI registers. */ 1600 pParam-> base.reg_gen= pParam->fParam - OP_PARM_REG_GEN16_START;1600 pParam->Base.idxGenReg = pParam->fParam - OP_PARM_REG_GEN16_START; 1601 1601 pParam->fUse |= DISUSE_REG_GEN16; 1602 1602 pParam->cb = 2; … … 1606 1606 { 1607 1607 /* 8-bit AL..DL, AH..DH registers. */ 1608 pParam-> base.reg_gen= pParam->fParam - OP_PARM_REG_GEN8_START;1608 pParam->Base.idxGenReg = pParam->fParam - OP_PARM_REG_GEN8_START; 1609 1609 pParam->fUse |= DISUSE_REG_GEN8; 1610 1610 pParam->cb = 1; … … 1616 1616 && (pCpu->fPrefix & DISPREFIX_REX) 1617 1617 && (pCpu->fRexPrefix & DISPREFIX_REX_FLAGS)) 1618 pParam-> base.reg_gen+= 8; /* least significant byte of R8-R15 */1618 pParam->Base.idxGenReg += 8; /* least significant byte of R8-R15 */ 1619 1619 } 1620 1620 } … … 1623 1623 { 1624 1624 /* FPU registers. */ 1625 pParam-> base.reg_fp= pParam->fParam - OP_PARM_REG_FP_START;1625 pParam->Base.idxFpuReg = pParam->fParam - OP_PARM_REG_FP_START; 1626 1626 pParam->fUse |= DISUSE_REG_FP; 1627 1627 pParam->cb = 10; … … 1642 1642 if (pCpu->uAddrMode == DISCPUMODE_32BIT) 1643 1643 { 1644 pParam-> base.reg_gen= DISGREG_ESI;1644 pParam->Base.idxGenReg = DISGREG_ESI; 1645 1645 pParam->fUse |= DISUSE_REG_GEN32; 1646 1646 } … … 1648 1648 if (pCpu->uAddrMode == DISCPUMODE_64BIT) 1649 1649 { 1650 pParam-> base.reg_gen= DISGREG_RSI;1650 pParam->Base.idxGenReg = DISGREG_RSI; 1651 1651 pParam->fUse |= DISUSE_REG_GEN64; 1652 1652 } 1653 1653 else 1654 1654 { 1655 pParam-> base.reg_gen= DISGREG_SI;1655 pParam->Base.idxGenReg = DISGREG_SI; 1656 1656 pParam->fUse |= DISUSE_REG_GEN16; 1657 1657 } … … 1667 1667 if (pCpu->uAddrMode == DISCPUMODE_32BIT) 1668 1668 { 1669 pParam-> base.reg_gen= DISGREG_ESI;1669 pParam->Base.idxGenReg = DISGREG_ESI; 1670 1670 pParam->fUse |= DISUSE_REG_GEN32; 1671 1671 } … … 1673 1673 if (pCpu->uAddrMode == DISCPUMODE_64BIT) 1674 1674 { 1675 pParam-> base.reg_gen= DISGREG_RSI;1675 pParam->Base.idxGenReg = DISGREG_RSI; 1676 1676 pParam->fUse |= DISUSE_REG_GEN64; 1677 1677 } 1678 1678 else 1679 1679 { 1680 pParam-> base.reg_gen= DISGREG_SI;1680 pParam->Base.idxGenReg = DISGREG_SI; 1681 1681 pParam->fUse |= DISUSE_REG_GEN16; 1682 1682 } … … 1692 1692 if (pCpu->uAddrMode == DISCPUMODE_32BIT) 1693 1693 { 1694 pParam-> base.reg_gen= DISGREG_EDI;1694 pParam->Base.idxGenReg = DISGREG_EDI; 1695 1695 pParam->fUse |= DISUSE_REG_GEN32; 1696 1696 } … … 1698 1698 if (pCpu->uAddrMode == DISCPUMODE_64BIT) 1699 1699 { 1700 pParam-> base.reg_gen= DISGREG_RDI;1700 pParam->Base.idxGenReg = DISGREG_RDI; 1701 1701 pParam->fUse |= DISUSE_REG_GEN64; 1702 1702 } 1703 1703 else 1704 1704 { 1705 pParam-> base.reg_gen= DISGREG_DI;1705 pParam->Base.idxGenReg = DISGREG_DI; 1706 1706 pParam->fUse |= DISUSE_REG_GEN16; 1707 1707 } … … 1717 1717 if (pCpu->uAddrMode == DISCPUMODE_32BIT) 1718 1718 { 1719 pParam-> base.reg_gen= DISGREG_EDI;1719 pParam->Base.idxGenReg = DISGREG_EDI; 1720 1720 pParam->fUse |= DISUSE_REG_GEN32; 1721 1721 } … … 1723 1723 if (pCpu->uAddrMode == DISCPUMODE_64BIT) 1724 1724 { 1725 pParam-> base.reg_gen= DISGREG_RDI;1725 pParam->Base.idxGenReg = DISGREG_RDI; 1726 1726 pParam->fUse |= DISUSE_REG_GEN64; 1727 1727 } 1728 1728 else 1729 1729 { 1730 pParam-> base.reg_gen= DISGREG_DI;1730 pParam->Base.idxGenReg = DISGREG_DI; 1731 1731 pParam->fUse |= DISUSE_REG_GEN16; 1732 1732 } … … 2341 2341 2342 2342 pParam->fUse |= DISUSE_REG_GEN8; 2343 pParam-> base.reg_gen= idx;2343 pParam->Base.idxGenReg = idx; 2344 2344 break; 2345 2345 … … 2348 2348 2349 2349 pParam->fUse |= DISUSE_REG_GEN16; 2350 pParam-> base.reg_gen= idx;2350 pParam->Base.idxGenReg = idx; 2351 2351 break; 2352 2352 … … 2355 2355 2356 2356 pParam->fUse |= DISUSE_REG_GEN32; 2357 pParam-> base.reg_gen= idx;2357 pParam->Base.idxGenReg = idx; 2358 2358 break; 2359 2359 2360 2360 case OP_PARM_q: 2361 2361 pParam->fUse |= DISUSE_REG_GEN64; 2362 pParam-> base.reg_gen= idx;2362 pParam->Base.idxGenReg = idx; 2363 2363 break; 2364 2364 … … 2375 2375 NOREF(pCpu); NOREF(pOp); 2376 2376 pParam->fUse |= DISUSE_REG_GEN16; 2377 pParam-> base.reg_gen= BaseModRMReg16[idx];2377 pParam->Base.idxGenReg = BaseModRMReg16[idx]; 2378 2378 if (idx < 4) 2379 2379 { … … 2395 2395 2396 2396 pParam->fUse |= DISUSE_REG_SEG; 2397 pParam-> base.reg_seg = (DISSELREG)idx;2397 pParam->Base.idxSegReg = (DISSELREG)idx; 2398 2398 } 2399 2399 -
trunk/src/VBox/Disassembler/DisasmFormatYasm.cpp
r41743 r41744 100 100 case DISUSE_REG_GEN8: 101 101 { 102 Assert(pParam-> base.reg_gen< RT_ELEMENTS(g_aszYasmRegGen8));103 const char *psz = g_aszYasmRegGen8[pParam-> base.reg_gen];102 Assert(pParam->Base.idxGenReg < RT_ELEMENTS(g_aszYasmRegGen8)); 103 const char *psz = g_aszYasmRegGen8[pParam->Base.idxGenReg]; 104 104 *pcchReg = 2 + !!psz[2] + !!psz[3]; 105 105 return psz; … … 108 108 case DISUSE_REG_GEN16: 109 109 { 110 Assert(pParam-> base.reg_gen< RT_ELEMENTS(g_aszYasmRegGen16));111 const char *psz = g_aszYasmRegGen16[pParam-> base.reg_gen];110 Assert(pParam->Base.idxGenReg < RT_ELEMENTS(g_aszYasmRegGen16)); 111 const char *psz = g_aszYasmRegGen16[pParam->Base.idxGenReg]; 112 112 *pcchReg = 2 + !!psz[2] + !!psz[3]; 113 113 return psz; … … 116 116 case DISUSE_REG_GEN32: 117 117 { 118 Assert(pParam-> base.reg_gen< RT_ELEMENTS(g_aszYasmRegGen32));119 const char *psz = g_aszYasmRegGen32[pParam-> base.reg_gen];118 Assert(pParam->Base.idxGenReg < RT_ELEMENTS(g_aszYasmRegGen32)); 119 const char *psz = g_aszYasmRegGen32[pParam->Base.idxGenReg]; 120 120 *pcchReg = 2 + !!psz[2] + !!psz[3]; 121 121 return psz; … … 124 124 case DISUSE_REG_GEN64: 125 125 { 126 Assert(pParam-> base.reg_gen< RT_ELEMENTS(g_aszYasmRegGen64));127 const char *psz = g_aszYasmRegGen64[pParam-> base.reg_gen];126 Assert(pParam->Base.idxGenReg < RT_ELEMENTS(g_aszYasmRegGen64)); 127 const char *psz = g_aszYasmRegGen64[pParam->Base.idxGenReg]; 128 128 *pcchReg = 2 + !!psz[2] + !!psz[3]; 129 129 return psz; … … 132 132 case DISUSE_REG_FP: 133 133 { 134 Assert(pParam-> base.reg_fp< RT_ELEMENTS(g_aszYasmRegFP));135 const char *psz = g_aszYasmRegFP[pParam-> base.reg_fp];134 Assert(pParam->Base.idxFpuReg < RT_ELEMENTS(g_aszYasmRegFP)); 135 const char *psz = g_aszYasmRegFP[pParam->Base.idxFpuReg]; 136 136 *pcchReg = 3; 137 137 return psz; … … 140 140 case DISUSE_REG_MMX: 141 141 { 142 Assert(pParam-> base.reg_mmx< RT_ELEMENTS(g_aszYasmRegMMX));143 const char *psz = g_aszYasmRegMMX[pParam-> base.reg_mmx];142 Assert(pParam->Base.idxMmxReg < RT_ELEMENTS(g_aszYasmRegMMX)); 143 const char *psz = g_aszYasmRegMMX[pParam->Base.idxMmxReg]; 144 144 *pcchReg = 3; 145 145 return psz; … … 148 148 case DISUSE_REG_XMM: 149 149 { 150 Assert(pParam-> base.reg_xmm< RT_ELEMENTS(g_aszYasmRegXMM));151 const char *psz = g_aszYasmRegXMM[pParam-> base.reg_mmx];150 Assert(pParam->Base.idxXmmReg < RT_ELEMENTS(g_aszYasmRegXMM)); 151 const char *psz = g_aszYasmRegXMM[pParam->Base.idxMmxReg]; 152 152 *pcchReg = 4 + !!psz[4]; 153 153 return psz; … … 156 156 case DISUSE_REG_CR: 157 157 { 158 Assert(pParam-> base.reg_ctrl< RT_ELEMENTS(g_aszYasmRegCRx));159 const char *psz = g_aszYasmRegCRx[pParam-> base.reg_ctrl];158 Assert(pParam->Base.idxCtrlReg < RT_ELEMENTS(g_aszYasmRegCRx)); 159 const char *psz = g_aszYasmRegCRx[pParam->Base.idxCtrlReg]; 160 160 *pcchReg = 3; 161 161 return psz; … … 164 164 case DISUSE_REG_DBG: 165 165 { 166 Assert(pParam-> base.reg_dbg < RT_ELEMENTS(g_aszYasmRegDRx));167 const char *psz = g_aszYasmRegDRx[pParam-> base.reg_dbg];166 Assert(pParam->Base.idxDbgReg < RT_ELEMENTS(g_aszYasmRegDRx)); 167 const char *psz = g_aszYasmRegDRx[pParam->Base.idxDbgReg]; 168 168 *pcchReg = 3; 169 169 return psz; … … 172 172 case DISUSE_REG_SEG: 173 173 { 174 Assert(pParam-> base.reg_seg < RT_ELEMENTS(g_aszYasmRegCRx));175 const char *psz = g_aszYasmRegSeg[pParam-> base.reg_seg];174 Assert(pParam->Base.idxSegReg < RT_ELEMENTS(g_aszYasmRegCRx)); 175 const char *psz = g_aszYasmRegSeg[pParam->Base.idxSegReg]; 176 176 *pcchReg = 2; 177 177 return psz; … … 180 180 case DISUSE_REG_TEST: 181 181 { 182 Assert(pParam-> base.reg_test< RT_ELEMENTS(g_aszYasmRegTRx));183 const char *psz = g_aszYasmRegTRx[pParam-> base.reg_test];182 Assert(pParam->Base.idxTestReg < RT_ELEMENTS(g_aszYasmRegTRx)); 183 const char *psz = g_aszYasmRegTRx[pParam->Base.idxTestReg]; 184 184 *pcchReg = 3; 185 185 return psz; -
trunk/src/VBox/Disassembler/DisasmReg.cpp
r41743 r41744 270 270 AssertCompile(DISGREG_ESP == DISGREG_SP); 271 271 AssertCompile(DISGREG_EBP == DISGREG_BP); 272 if (pParam-> base.reg_gen == DISGREG_ESP || pParam->base.reg_gen== DISGREG_EBP)272 if (pParam->Base.idxGenReg == DISGREG_ESP || pParam->Base.idxGenReg == DISGREG_EBP) 273 273 return DISSELREG_SS; 274 274 } … … 515 515 { 516 516 pParamVal->flags |= DISQPV_FLAG_8; 517 if (RT_FAILURE(DISFetchReg8(pCtx, pParam-> base.reg_gen, &pParamVal->val.val8))) return VERR_INVALID_PARAMETER;517 if (RT_FAILURE(DISFetchReg8(pCtx, pParam->Base.idxGenReg, &pParamVal->val.val8))) return VERR_INVALID_PARAMETER; 518 518 } 519 519 else … … 521 521 { 522 522 pParamVal->flags |= DISQPV_FLAG_16; 523 if (RT_FAILURE(DISFetchReg16(pCtx, pParam-> base.reg_gen, &pParamVal->val.val16))) return VERR_INVALID_PARAMETER;523 if (RT_FAILURE(DISFetchReg16(pCtx, pParam->Base.idxGenReg, &pParamVal->val.val16))) return VERR_INVALID_PARAMETER; 524 524 } 525 525 else … … 527 527 { 528 528 pParamVal->flags |= DISQPV_FLAG_32; 529 if (RT_FAILURE(DISFetchReg32(pCtx, pParam-> base.reg_gen, &pParamVal->val.val32))) return VERR_INVALID_PARAMETER;529 if (RT_FAILURE(DISFetchReg32(pCtx, pParam->Base.idxGenReg, &pParamVal->val.val32))) return VERR_INVALID_PARAMETER; 530 530 } 531 531 else … … 533 533 { 534 534 pParamVal->flags |= DISQPV_FLAG_64; 535 if (RT_FAILURE(DISFetchReg64(pCtx, pParam-> base.reg_gen, &pParamVal->val.val64))) return VERR_INVALID_PARAMETER;535 if (RT_FAILURE(DISFetchReg64(pCtx, pParam->Base.idxGenReg, &pParamVal->val.val64))) return VERR_INVALID_PARAMETER; 536 536 } 537 537 else … … 647 647 pParamVal->flags |= DISQPV_FLAG_8; 648 648 pParamVal->size = sizeof(uint8_t); 649 if (RT_FAILURE(DISFetchReg8(pCtx, pParam-> base.reg_gen, &pParamVal->val.val8))) return VERR_INVALID_PARAMETER;649 if (RT_FAILURE(DISFetchReg8(pCtx, pParam->Base.idxGenReg, &pParamVal->val.val8))) return VERR_INVALID_PARAMETER; 650 650 } 651 651 else … … 654 654 pParamVal->flags |= DISQPV_FLAG_16; 655 655 pParamVal->size = sizeof(uint16_t); 656 if (RT_FAILURE(DISFetchReg16(pCtx, pParam-> base.reg_gen, &pParamVal->val.val16))) return VERR_INVALID_PARAMETER;656 if (RT_FAILURE(DISFetchReg16(pCtx, pParam->Base.idxGenReg, &pParamVal->val.val16))) return VERR_INVALID_PARAMETER; 657 657 } 658 658 else … … 661 661 pParamVal->flags |= DISQPV_FLAG_32; 662 662 pParamVal->size = sizeof(uint32_t); 663 if (RT_FAILURE(DISFetchReg32(pCtx, pParam-> base.reg_gen, &pParamVal->val.val32))) return VERR_INVALID_PARAMETER;663 if (RT_FAILURE(DISFetchReg32(pCtx, pParam->Base.idxGenReg, &pParamVal->val.val32))) return VERR_INVALID_PARAMETER; 664 664 } 665 665 else … … 668 668 pParamVal->flags |= DISQPV_FLAG_64; 669 669 pParamVal->size = sizeof(uint64_t); 670 if (RT_FAILURE(DISFetchReg64(pCtx, pParam-> base.reg_gen, &pParamVal->val.val64))) return VERR_INVALID_PARAMETER;670 if (RT_FAILURE(DISFetchReg64(pCtx, pParam->Base.idxGenReg, &pParamVal->val.val64))) return VERR_INVALID_PARAMETER; 671 671 } 672 672 else … … 767 767 { 768 768 uint8_t *pu8Reg; 769 if (RT_SUCCESS(DISPtrReg8(pCtx, pParam-> base.reg_gen, &pu8Reg)))769 if (RT_SUCCESS(DISPtrReg8(pCtx, pParam->Base.idxGenReg, &pu8Reg))) 770 770 { 771 771 *pcbSize = sizeof(uint8_t); … … 778 778 { 779 779 uint16_t *pu16Reg; 780 if (RT_SUCCESS(DISPtrReg16(pCtx, pParam-> base.reg_gen, &pu16Reg)))780 if (RT_SUCCESS(DISPtrReg16(pCtx, pParam->Base.idxGenReg, &pu16Reg))) 781 781 { 782 782 *pcbSize = sizeof(uint16_t); … … 789 789 { 790 790 uint32_t *pu32Reg; 791 if (RT_SUCCESS(DISPtrReg32(pCtx, pParam-> base.reg_gen, &pu32Reg)))791 if (RT_SUCCESS(DISPtrReg32(pCtx, pParam->Base.idxGenReg, &pu32Reg))) 792 792 { 793 793 *pcbSize = sizeof(uint32_t); … … 800 800 { 801 801 uint64_t *pu64Reg; 802 if (RT_SUCCESS(DISPtrReg64(pCtx, pParam-> base.reg_gen, &pu64Reg)))802 if (RT_SUCCESS(DISPtrReg64(pCtx, pParam->Base.idxGenReg, &pu64Reg))) 803 803 { 804 804 *pcbSize = sizeof(uint64_t); -
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r41739 r41744 879 879 { 880 880 case 1: //special case for AH etc 881 rc = DISWriteReg8(pRegFrame, pDis->Param1. base.reg_gen, (uint8_t )valpar2); break;882 case 2: rc = DISWriteReg16(pRegFrame, pDis->Param1. base.reg_gen, (uint16_t)valpar2); break;883 case 4: rc = DISWriteReg32(pRegFrame, pDis->Param1. base.reg_gen, (uint32_t)valpar2); break;884 case 8: rc = DISWriteReg64(pRegFrame, pDis->Param1. base.reg_gen, valpar2); break;881 rc = DISWriteReg8(pRegFrame, pDis->Param1.Base.idxGenReg, (uint8_t )valpar2); break; 882 case 2: rc = DISWriteReg16(pRegFrame, pDis->Param1.Base.idxGenReg, (uint16_t)valpar2); break; 883 case 4: rc = DISWriteReg32(pRegFrame, pDis->Param1.Base.idxGenReg, (uint32_t)valpar2); break; 884 case 8: rc = DISWriteReg64(pRegFrame, pDis->Param1.Base.idxGenReg, valpar2); break; 885 885 default: AssertFailedReturn(VERR_EM_INTERPRETER); 886 886 } … … 905 905 { 906 906 case 1: //special case for AH etc 907 rc = DISWriteReg8(pRegFrame, pDis->Param2. base.reg_gen, (uint8_t )valpar1); break;908 case 2: rc = DISWriteReg16(pRegFrame, pDis->Param2. base.reg_gen, (uint16_t)valpar1); break;909 case 4: rc = DISWriteReg32(pRegFrame, pDis->Param2. base.reg_gen, (uint32_t)valpar1); break;910 case 8: rc = DISWriteReg64(pRegFrame, pDis->Param2. base.reg_gen, valpar1); break;907 rc = DISWriteReg8(pRegFrame, pDis->Param2.Base.idxGenReg, (uint8_t )valpar1); break; 908 case 2: rc = DISWriteReg16(pRegFrame, pDis->Param2.Base.idxGenReg, (uint16_t)valpar1); break; 909 case 4: rc = DISWriteReg32(pRegFrame, pDis->Param2.Base.idxGenReg, (uint32_t)valpar1); break; 910 case 8: rc = DISWriteReg64(pRegFrame, pDis->Param2.Base.idxGenReg, valpar1); break; 911 911 default: AssertFailedReturn(VERR_EM_INTERPRETER); 912 912 } … … 1051 1051 if ( (pDis->Param1.fUse & DISUSE_BASE) 1052 1052 && (pDis->Param1.fUse & (DISUSE_REG_GEN16|DISUSE_REG_GEN32)) 1053 && pDis->Param1. base.reg_gen== DISGREG_ESP1053 && pDis->Param1.Base.idxGenReg == DISGREG_ESP 1054 1054 ) 1055 1055 pParam1 = (RTGCPTR)((RTGCUINTPTR)pParam1 + param1.size); … … 1609 1609 switch(param1.size) 1610 1610 { 1611 case 1: rc = DISWriteReg8(pRegFrame, pDis->Param1. base.reg_gen, (uint8_t) val64); break;1612 case 2: rc = DISWriteReg16(pRegFrame, pDis->Param1. base.reg_gen, (uint16_t)val64); break;1613 case 4: rc = DISWriteReg32(pRegFrame, pDis->Param1. base.reg_gen, (uint32_t)val64); break;1614 case 8: rc = DISWriteReg64(pRegFrame, pDis->Param1. base.reg_gen, val64); break;1611 case 1: rc = DISWriteReg8(pRegFrame, pDis->Param1.Base.idxGenReg, (uint8_t) val64); break; 1612 case 2: rc = DISWriteReg16(pRegFrame, pDis->Param1.Base.idxGenReg, (uint16_t)val64); break; 1613 case 4: rc = DISWriteReg32(pRegFrame, pDis->Param1.Base.idxGenReg, (uint32_t)val64); break; 1614 case 8: rc = DISWriteReg64(pRegFrame, pDis->Param1.Base.idxGenReg, val64); break; 1615 1615 default: 1616 1616 return VERR_EM_INTERPRETER; … … 2428 2428 if(param1.size != sizeof(uint16_t)) 2429 2429 return VERR_EM_INTERPRETER; 2430 LogFlow(("emInterpretSmsw %d <- cr0 (%x)\n", pDis->Param1. base.reg_gen, cr0));2431 rc = DISWriteReg16(pRegFrame, pDis->Param1. base.reg_gen, cr0);2430 LogFlow(("emInterpretSmsw %d <- cr0 (%x)\n", pDis->Param1.Base.idxGenReg, cr0)); 2431 rc = DISWriteReg16(pRegFrame, pDis->Param1.Base.idxGenReg, cr0); 2432 2432 break; 2433 2433 … … 2469 2469 NOREF(pvFault); NOREF(pcbSize); 2470 2470 if ((pDis->Param1.fUse == DISUSE_REG_GEN32 || pDis->Param1.fUse == DISUSE_REG_GEN64) && pDis->Param2.fUse == DISUSE_REG_CR) 2471 return EMInterpretCRxRead(pVM, pVCpu, pRegFrame, pDis->Param1. base.reg_gen, pDis->Param2.base.reg_ctrl);2471 return EMInterpretCRxRead(pVM, pVCpu, pRegFrame, pDis->Param1.Base.idxGenReg, pDis->Param2.Base.idxCtrlReg); 2472 2472 2473 2473 if (pDis->Param1.fUse == DISUSE_REG_CR && (pDis->Param2.fUse == DISUSE_REG_GEN32 || pDis->Param2.fUse == DISUSE_REG_GEN64)) 2474 return EMInterpretCRxWrite(pVM, pVCpu, pRegFrame, pDis->Param1. base.reg_ctrl, pDis->Param2.base.reg_gen);2474 return EMInterpretCRxWrite(pVM, pVCpu, pRegFrame, pDis->Param1.Base.idxCtrlReg, pDis->Param2.Base.idxGenReg); 2475 2475 2476 2476 AssertMsgFailedReturn(("Unexpected control register move\n"), VERR_EM_INTERPRETER); … … 2560 2560 if((pDis->Param1.fUse == DISUSE_REG_GEN32 || pDis->Param1.fUse == DISUSE_REG_GEN64) && pDis->Param2.fUse == DISUSE_REG_DBG) 2561 2561 { 2562 rc = EMInterpretDRxRead(pVM, pVCpu, pRegFrame, pDis->Param1. base.reg_gen, pDis->Param2.base.reg_dbg);2562 rc = EMInterpretDRxRead(pVM, pVCpu, pRegFrame, pDis->Param1.Base.idxGenReg, pDis->Param2.Base.idxDbgReg); 2563 2563 } 2564 2564 else 2565 2565 if(pDis->Param1.fUse == DISUSE_REG_DBG && (pDis->Param2.fUse == DISUSE_REG_GEN32 || pDis->Param2.fUse == DISUSE_REG_GEN64)) 2566 2566 { 2567 rc = EMInterpretDRxWrite(pVM, pVCpu, pRegFrame, pDis->Param1. base.reg_dbg, pDis->Param2.base.reg_gen);2567 rc = EMInterpretDRxWrite(pVM, pVCpu, pRegFrame, pDis->Param1.Base.idxDbgReg, pDis->Param2.Base.idxGenReg); 2568 2568 } 2569 2569 else -
trunk/src/VBox/VMM/VMMAll/IOMAll.cpp
r41741 r41744 81 81 { 82 82 *pcbSize = 4; 83 DISFetchReg32(pRegFrame, pParam-> base.reg_gen, (uint32_t *)pu64Data);83 DISFetchReg32(pRegFrame, pParam->Base.idxGenReg, (uint32_t *)pu64Data); 84 84 return true; 85 85 } … … 88 88 { 89 89 *pcbSize = 2; 90 DISFetchReg16(pRegFrame, pParam-> base.reg_gen, (uint16_t *)pu64Data);90 DISFetchReg16(pRegFrame, pParam->Base.idxGenReg, (uint16_t *)pu64Data); 91 91 return true; 92 92 } … … 95 95 { 96 96 *pcbSize = 1; 97 DISFetchReg8(pRegFrame, pParam-> base.reg_gen, (uint8_t *)pu64Data);97 DISFetchReg8(pRegFrame, pParam->Base.idxGenReg, (uint8_t *)pu64Data); 98 98 return true; 99 99 } … … 101 101 Assert(pParam->fUse & DISUSE_REG_GEN64); 102 102 *pcbSize = 8; 103 DISFetchReg64(pRegFrame, pParam-> base.reg_gen, pu64Data);103 DISFetchReg64(pRegFrame, pParam->Base.idxGenReg, pu64Data); 104 104 return true; 105 105 } … … 137 137 { 138 138 *pcbSize = 2; 139 DISFetchRegSeg(pRegFrame, (DISSELREG)pParam-> base.reg_seg, (RTSEL *)pu64Data);139 DISFetchRegSeg(pRegFrame, (DISSELREG)pParam->Base.idxSegReg, (RTSEL *)pu64Data); 140 140 return true; 141 141 } /* Else - error. */ … … 169 169 if (pParam->fUse & DISUSE_REG_GEN32) 170 170 { 171 DISWriteReg32(pRegFrame, pParam-> base.reg_gen, (uint32_t)u64Data);171 DISWriteReg32(pRegFrame, pParam->Base.idxGenReg, (uint32_t)u64Data); 172 172 return true; 173 173 } … … 175 175 if (pParam->fUse & DISUSE_REG_GEN64) 176 176 { 177 DISWriteReg64(pRegFrame, pParam-> base.reg_gen, u64Data);177 DISWriteReg64(pRegFrame, pParam->Base.idxGenReg, u64Data); 178 178 return true; 179 179 } … … 181 181 if (pParam->fUse & DISUSE_REG_GEN16) 182 182 { 183 DISWriteReg16(pRegFrame, pParam-> base.reg_gen, (uint16_t)u64Data);183 DISWriteReg16(pRegFrame, pParam->Base.idxGenReg, (uint16_t)u64Data); 184 184 return true; 185 185 } … … 187 187 if (pParam->fUse & DISUSE_REG_GEN8) 188 188 { 189 DISWriteReg8(pRegFrame, pParam-> base.reg_gen, (uint8_t)u64Data);189 DISWriteReg8(pRegFrame, pParam->Base.idxGenReg, (uint8_t)u64Data); 190 190 return true; 191 191 } … … 193 193 if (pParam->fUse & DISUSE_REG_SEG) 194 194 { 195 DISWriteRegSeg(pRegFrame, (DISSELREG)pParam-> base.reg_seg, (RTSEL)u64Data);195 DISWriteRegSeg(pRegFrame, (DISSELREG)pParam->Base.idxSegReg, (RTSEL)u64Data); 196 196 return true; 197 197 } -
trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
r41739 r41744 761 761 #endif 762 762 763 LogFlow(("Reused instr %RGv %d at %RGv param1.fUse=%llx param1.reg=%d\n", pRegFrame->rip, pDis->pCurInstr->uOpcode, pvFault, pDis->Param1.fUse, pDis->Param1. base.reg_gen));763 LogFlow(("Reused instr %RGv %d at %RGv param1.fUse=%llx param1.reg=%d\n", pRegFrame->rip, pDis->pCurInstr->uOpcode, pvFault, pDis->Param1.fUse, pDis->Param1.Base.idxGenReg)); 764 764 765 765 /* Non-supervisor mode write means it's used for something else. */ … … 806 806 if ( ( (pDis->Param1.fUse & DISUSE_REG_GEN32) 807 807 || (pDis->Param1.fUse & DISUSE_REG_GEN64)) 808 && (pDis->Param1. base.reg_gen== DISGREG_ESP))808 && (pDis->Param1.Base.idxGenReg == DISGREG_ESP)) 809 809 { 810 810 Log4(("pgmPoolMonitorIsReused: ESP\n")); -
trunk/src/VBox/VMM/VMMR3/EMRaw.cpp
r41739 r41744 994 994 //read 995 995 Assert(Cpu.Param2.fUse & DISUSE_REG_CR); 996 Assert(Cpu.Param2. base.reg_ctrl<= DISCREG_CR4);997 STAM_COUNTER_INC(&pStats->StatMovReadCR[Cpu.Param2. base.reg_ctrl]);996 Assert(Cpu.Param2.Base.idxCtrlReg <= DISCREG_CR4); 997 STAM_COUNTER_INC(&pStats->StatMovReadCR[Cpu.Param2.Base.idxCtrlReg]); 998 998 } 999 999 else … … 1001 1001 //write 1002 1002 Assert(Cpu.Param1.fUse & DISUSE_REG_CR); 1003 Assert(Cpu.Param1. base.reg_ctrl<= DISCREG_CR4);1004 STAM_COUNTER_INC(&pStats->StatMovWriteCR[Cpu.Param1. base.reg_ctrl]);1003 Assert(Cpu.Param1.Base.idxCtrlReg <= DISCREG_CR4); 1004 STAM_COUNTER_INC(&pStats->StatMovWriteCR[Cpu.Param1.Base.idxCtrlReg]); 1005 1005 } 1006 1006 break; -
trunk/src/VBox/VMM/VMMR3/HWACCM.cpp
r41741 r41744 1839 1839 { 1840 1840 pPatch->enmType = HWACCMTPRINSTR_WRITE_REG; 1841 pPatch->uSrcOperand = pDis->Param2. base.reg_gen;1841 pPatch->uSrcOperand = pDis->Param2.Base.idxGenReg; 1842 1842 } 1843 1843 else … … 1857 1857 RTGCPTR oldrip = pCtx->rip; 1858 1858 uint32_t oldcbOp = cbOp; 1859 uint32_t uMmioReg = pDis->Param1. base.reg_gen;1859 uint32_t uMmioReg = pDis->Param1.Base.idxGenReg; 1860 1860 1861 1861 /* read */ … … 1873 1873 && pDis->pCurInstr->uOpcode == OP_SHR 1874 1874 && pDis->Param1.fUse == DISUSE_REG_GEN32 1875 && pDis->Param1. base.reg_gen== uMmioReg1875 && pDis->Param1.Base.idxGenReg == uMmioReg 1876 1876 && pDis->Param2.fUse == DISUSE_IMMEDIATE8 1877 1877 && pDis->Param2.uValue == 4 … … 1890 1890 szInstr[1] = 0x0F; 1891 1891 szInstr[2] = 0x20; 1892 szInstr[3] = 0xC0 | pDis->Param1. base.reg_gen;1892 szInstr[3] = 0xC0 | pDis->Param1.Base.idxGenReg; 1893 1893 for (unsigned i = 4; i < pPatch->cbOp; i++) 1894 1894 szInstr[i] = 0x90; /* nop */ … … 1906 1906 { 1907 1907 pPatch->enmType = HWACCMTPRINSTR_READ; 1908 pPatch->uDstOperand = pDis->Param1. base.reg_gen;1908 pPatch->uDstOperand = pDis->Param1.Base.idxGenReg; 1909 1909 1910 1910 rc = PGMPhysSimpleWriteGCPtr(pVCpu, pCtx->rip, aVMMCall, sizeof(aVMMCall)); … … 2028 2028 * 2029 2029 */ 2030 bool fUsesEax = (pDis->Param2.fUse == DISUSE_REG_GEN32 && pDis->Param2. base.reg_gen== DISGREG_EAX);2030 bool fUsesEax = (pDis->Param2.fUse == DISUSE_REG_GEN32 && pDis->Param2.Base.idxGenReg == DISGREG_EAX); 2031 2031 2032 2032 aPatch[off++] = 0x51; /* push ecx */ … … 2041 2041 { 2042 2042 aPatch[off++] = 0x89; /* mov eax, src_reg */ 2043 aPatch[off++] = MAKE_MODRM(3, pDis->Param2. base.reg_gen, DISGREG_EAX);2043 aPatch[off++] = MAKE_MODRM(3, pDis->Param2.Base.idxGenReg, DISGREG_EAX); 2044 2044 } 2045 2045 } … … 2081 2081 Assert(pDis->Param1.fUse == DISUSE_REG_GEN32); 2082 2082 2083 if (pDis->Param1. base.reg_gen!= DISGREG_ECX)2083 if (pDis->Param1.Base.idxGenReg != DISGREG_ECX) 2084 2084 aPatch[off++] = 0x51; /* push ecx */ 2085 if (pDis->Param1. base.reg_gen!= DISGREG_EDX )2085 if (pDis->Param1.Base.idxGenReg != DISGREG_EDX ) 2086 2086 aPatch[off++] = 0x52; /* push edx */ 2087 if (pDis->Param1. base.reg_gen!= DISGREG_EAX)2087 if (pDis->Param1.Base.idxGenReg != DISGREG_EAX) 2088 2088 aPatch[off++] = 0x50; /* push eax */ 2089 2089 … … 2098 2098 aPatch[off++] = 0x32; 2099 2099 2100 if (pDis->Param1. base.reg_gen!= DISGREG_EAX)2100 if (pDis->Param1.Base.idxGenReg != DISGREG_EAX) 2101 2101 { 2102 2102 aPatch[off++] = 0x89; /* mov dst_reg, eax */ 2103 aPatch[off++] = MAKE_MODRM(3, DISGREG_EAX, pDis->Param1. base.reg_gen);2103 aPatch[off++] = MAKE_MODRM(3, DISGREG_EAX, pDis->Param1.Base.idxGenReg); 2104 2104 } 2105 2105 2106 if (pDis->Param1. base.reg_gen!= DISGREG_EAX)2106 if (pDis->Param1.Base.idxGenReg != DISGREG_EAX) 2107 2107 aPatch[off++] = 0x58; /* pop eax */ 2108 if (pDis->Param1. base.reg_gen!= DISGREG_EDX )2108 if (pDis->Param1.Base.idxGenReg != DISGREG_EDX ) 2109 2109 aPatch[off++] = 0x5A; /* pop edx */ 2110 if (pDis->Param1. base.reg_gen!= DISGREG_ECX)2110 if (pDis->Param1.Base.idxGenReg != DISGREG_ECX) 2111 2111 aPatch[off++] = 0x59; /* pop ecx */ 2112 2112 } -
trunk/src/VBox/VMM/VMMR3/PATM.cpp
r41741 r41744 1749 1749 /* mov ss, src? */ 1750 1750 if ( (pCpu->Param1.fUse & DISUSE_REG_SEG) 1751 && (pCpu->Param1. base.reg_seg == DISSELREG_SS))1751 && (pCpu->Param1.Base.idxSegReg == DISSELREG_SS)) 1752 1752 { 1753 1753 Log(("Force recompilation of next instruction for OP_MOV at %RRv\n", pCurInstrGC)); … … 1758 1758 else 1759 1759 if ( (pCpu->Param2.fUse & DISUSE_REG_SEG) 1760 && (pCpu->Param2. base.reg_seg == USE_REG_SS)1760 && (pCpu->Param2.Base.idxSegReg == USE_REG_SS) 1761 1761 && (pCpu->Param1.fUse & (DISUSE_REG_GEN32|DISUSE_REG_GEN16))) /** @todo memory operand must in theory be handled too */ 1762 1762 { -
trunk/src/VBox/VMM/VMMR3/PATMPatch.cpp
r41741 r41744 1167 1167 Assert(pCpu->Param2.fUse & DISUSE_REG_GEN32); 1168 1168 1169 dbgreg = pCpu->Param1. base.reg_dbg;1170 reg = pCpu->Param2. base.reg_gen;1169 dbgreg = pCpu->Param1.Base.idxDbgReg; 1170 reg = pCpu->Param2.Base.idxGenReg; 1171 1171 } 1172 1172 else … … 1177 1177 1178 1178 pPB[0] = 0x8B; // mov GPR, disp32 1179 reg = pCpu->Param1. base.reg_gen;1180 dbgreg = pCpu->Param2. base.reg_dbg;1179 reg = pCpu->Param1.Base.idxGenReg; 1180 dbgreg = pCpu->Param2.Base.idxDbgReg; 1181 1181 } 1182 1182 … … 1214 1214 // mov CRx, GPR 1215 1215 pPB[0] = 0x89; //mov disp32, GPR 1216 ctrlreg = pCpu->Param1. base.reg_ctrl;1217 reg = pCpu->Param2. base.reg_gen;1216 ctrlreg = pCpu->Param1.Base.idxCtrlReg; 1217 reg = pCpu->Param2.Base.idxGenReg; 1218 1218 Assert(pCpu->Param1.fUse & DISUSE_REG_CR); 1219 1219 Assert(pCpu->Param2.fUse & DISUSE_REG_GEN32); … … 1226 1226 1227 1227 pPB[0] = 0x8B; // mov GPR, disp32 1228 reg = pCpu->Param1. base.reg_gen;1229 ctrlreg = pCpu->Param2. base.reg_ctrl;1228 reg = pCpu->Param1.Base.idxGenReg; 1229 ctrlreg = pCpu->Param2.Base.idxCtrlReg; 1230 1230 } 1231 1231 … … 1292 1292 if (pCpu->fPrefix & DISPREFIX_OPSIZE) 1293 1293 pPB[offset++] = 0x66; /* size override -> 16 bits pop */ 1294 pPB[offset++] = 0x58 + pCpu->Param1. base.reg_gen;1294 pPB[offset++] = 0x58 + pCpu->Param1.Base.idxGenReg; 1295 1295 PATCHGEN_EPILOG(pPatch, offset); 1296 1296 … … 1335 1335 pPB[offset++] = 0x8B; // mov destreg, CPUMCTX.tr/ldtr 1336 1336 /* Modify REG part according to destination of original instruction */ 1337 pPB[offset++] = MAKE_MODRM(0, pCpu->Param1. base.reg_gen, 5);1337 pPB[offset++] = MAKE_MODRM(0, pCpu->Param1.Base.idxGenReg, 5); 1338 1338 if (pCpu->pCurInstr->uOpcode == OP_STR) 1339 1339 {
Note:
See TracChangeset
for help on using the changeset viewer.