Changeset 36821 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Apr 22, 2011 9:35:32 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 71380
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r36815 r36821 45 45 * Header Files * 46 46 *******************************************************************************/ 47 #define RT_STRICT48 #define LOG_ENABLED47 //#define RT_STRICT 48 //#define LOG_ENABLED 49 49 #define LOG_GROUP LOG_GROUP_EM /** @todo add log group */ 50 50 #include <VBox/vmm/iem.h> … … 346 346 iemAImpl_test_u32, NULL, 347 347 iemAImpl_test_u64, NULL 348 }; 349 350 /** Function table for the IMUL instruction. */ 351 static const IEMOPBINSIZES g_iemAImpl_imul_two = 352 { 353 NULL, NULL, 354 iemAImpl_imul_two_u16, NULL, 355 iemAImpl_imul_two_u32, NULL, 356 iemAImpl_imul_two_u64, NULL 348 357 }; 349 358 … … 554 563 static VBOXSTRICTRC iemInitDecoderAndPrefetchOpcodes(PIEMCPU pIemCpu) 555 564 { 565 #ifdef IEM_VERIFICATION_MODE 566 uint8_t const cbOldOpcodes = pIemCpu->cbOpcode; 567 #endif 556 568 iemInitDecode(pIemCpu); 557 569 … … 596 608 * TLB... */ 597 609 610 #ifdef IEM_VERIFICATION_MODE 611 /* 612 * Optimistic optimization: Use unconsumed opcode bytes from the previous 613 * instruction. 614 */ 615 /** @todo optimize this differently by not using PGMPhysRead. */ 616 RTGCPHYS const offPrevOpcodes = GCPhys - pIemCpu->GCPhysOpcodes; 617 pIemCpu->GCPhysOpcodes = GCPhys; 618 if (offPrevOpcodes < cbOldOpcodes) 619 { 620 uint8_t cbNew = cbOldOpcodes - (uint8_t)offPrevOpcodes; 621 memmove(&pIemCpu->abOpcode[0], &pIemCpu->abOpcode[offPrevOpcodes], cbNew); 622 pIemCpu->cbOpcode = cbNew; 623 return VINF_SUCCESS; 624 } 625 #endif 626 598 627 /* 599 628 * Read the bytes at this address. … … 604 633 if (cbToTryRead > sizeof(pIemCpu->abOpcode)) 605 634 cbToTryRead = sizeof(pIemCpu->abOpcode); 635 /** @todo patch manager */ 606 636 if (!pIemCpu->fByPassHandlers) 607 637 rc = PGMPhysRead(IEMCPU_TO_VM(pIemCpu), GCPhys, pIemCpu->abOpcode, cbToTryRead); … … 6000 6030 case 6: u32EffAddr = pCtx->esi; break; 6001 6031 case 7: u32EffAddr = pCtx->edi; break; 6032 IEM_NOT_REACHED_DEFAULT_CASE_RET(); 6002 6033 } 6003 6034 u32EffAddr <<= (bSib >> X86_SIB_SCALE_SHIFT) & X86_SIB_SCALE_SMASK; … … 6026 6057 case 6: u32EffAddr += pCtx->esi; break; 6027 6058 case 7: u32EffAddr += pCtx->edi; break; 6059 IEM_NOT_REACHED_DEFAULT_CASE_RET(); 6028 6060 } 6029 6061 break; … … 6032 6064 case 6: u32EffAddr = pCtx->esi; break; 6033 6065 case 7: u32EffAddr = pCtx->edi; break; 6066 IEM_NOT_REACHED_DEFAULT_CASE_RET(); 6034 6067 } 6035 6068 … … 6254 6287 pIemCpu->cIOWrites = 0; 6255 6288 pIemCpu->fMulDivHack = false; 6256 pIemCpu->fShlHack = false; 6257 6289 pIemCpu->fShiftOfHack= false; 6290 6291 # ifndef IEM_VERIFICATION_MODE_NO_REM 6258 6292 /* 6259 6293 * Free all verification records. … … 6275 6309 pIemCpu->ppOtherEvtRecNext = &pIemCpu->pOtherEvtRecHead; 6276 6310 } while (pEvtRec); 6311 # endif 6277 6312 } 6278 6313 … … 6637 6672 if (pIemCpu->fMulDivHack) 6638 6673 fFlagsMask &= ~(X86_EFL_SF | X86_EFL_ZF | X86_EFL_AF | X86_EFL_PF | X86_EFL_CF); 6639 if (pIemCpu->fSh lHack)6674 if (pIemCpu->fShiftOfHack) 6640 6675 fFlagsMask &= ~(X86_EFL_OF); 6641 6676 if ((pOrgCtx->rflags.u & fFlagsMask) != (pDebugCtx->rflags.u & fFlagsMask)) … … 6844 6879 #ifdef LOG_ENABLED 6845 6880 PCPUMCTX pCtx = pIemCpu->CTX_SUFF(pCtx); 6846 char szInstr[256]; 6847 uint32_t cbInstr = 0; 6848 DBGFR3DisasInstrEx(pVCpu->pVMR3, pVCpu->idCpu, 0, 0, 6849 DBGF_DISAS_FLAGS_CURRENT_GUEST | DBGF_DISAS_FLAGS_DEFAULT_MODE, 6850 szInstr, sizeof(szInstr), &cbInstr); 6851 6852 Log2(("**** " 6853 " eax=%08x ebx=%08x ecx=%08x edx=%08x esi=%08x edi=%08x\n" 6854 " eip=%08x esp=%08x ebp=%08x iopl=%d\n" 6855 " cs=%04x ss=%04x ds=%04x es=%04x fs=%04x gs=%04x efl=%08x\n" 6856 " %s\n" 6857 , 6858 pCtx->eax, pCtx->ebx, pCtx->ecx, pCtx->edx, pCtx->esi, pCtx->edi, 6859 pCtx->eip, pCtx->esp, pCtx->ebp, pCtx->eflags.Bits.u2IOPL, 6860 (RTSEL)pCtx->cs, (RTSEL)pCtx->ss, (RTSEL)pCtx->ds, (RTSEL)pCtx->es, 6861 (RTSEL)pCtx->fs, (RTSEL)pCtx->gs, pCtx->eflags.u, 6862 szInstr)); 6881 if (0)//LogIs2Enabled()) 6882 { 6883 char szInstr[256]; 6884 uint32_t cbInstr = 0; 6885 DBGFR3DisasInstrEx(pVCpu->pVMR3, pVCpu->idCpu, 0, 0, 6886 DBGF_DISAS_FLAGS_CURRENT_GUEST | DBGF_DISAS_FLAGS_DEFAULT_MODE, 6887 szInstr, sizeof(szInstr), &cbInstr); 6888 6889 Log2(("**** " 6890 " eax=%08x ebx=%08x ecx=%08x edx=%08x esi=%08x edi=%08x\n" 6891 " eip=%08x esp=%08x ebp=%08x iopl=%d\n" 6892 " cs=%04x ss=%04x ds=%04x es=%04x fs=%04x gs=%04x efl=%08x\n" 6893 " %s\n" 6894 , 6895 pCtx->eax, pCtx->ebx, pCtx->ecx, pCtx->edx, pCtx->esi, pCtx->edi, 6896 pCtx->eip, pCtx->esp, pCtx->ebp, pCtx->eflags.Bits.u2IOPL, 6897 (RTSEL)pCtx->cs, (RTSEL)pCtx->ss, (RTSEL)pCtx->ds, (RTSEL)pCtx->es, 6898 (RTSEL)pCtx->fs, (RTSEL)pCtx->gs, pCtx->eflags.u, 6899 szInstr)); 6900 } 6863 6901 #endif 6864 6902 -
trunk/src/VBox/VMM/VMMAll/IEMAllInstructions.cpp.h
r36815 r36821 1678 1678 /** Opcode 0x0f 0x9f. */ 1679 1679 FNIEMOP_STUB(iemOp_setnle_Jv); 1680 1681 1682 /** 1683 * Common 'push segment-register' helper. 1684 */ 1685 FNIEMOP_DEF_1(iemOpCommonPushSReg, uint8_t, iReg) 1686 { 1687 IEMOP_HLP_NO_LOCK_PREFIX(); 1688 if (iReg < X86_SREG_FS) 1689 IEMOP_HLP_NO_64BIT(); 1690 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE(); 1691 1692 switch (pIemCpu->enmEffOpSize) 1693 { 1694 case IEMMODE_16BIT: 1695 IEM_MC_BEGIN(0, 1); 1696 IEM_MC_LOCAL(uint16_t, u16Value); 1697 IEM_MC_FETCH_SREG_U16(u16Value, iReg); 1698 IEM_MC_PUSH_U16(u16Value); 1699 IEM_MC_ADVANCE_RIP(); 1700 IEM_MC_END(); 1701 break; 1702 1703 case IEMMODE_32BIT: 1704 IEM_MC_BEGIN(0, 1); 1705 IEM_MC_LOCAL(uint32_t, u32Value); 1706 IEM_MC_FETCH_SREG_ZX_U32(u32Value, iReg); 1707 IEM_MC_PUSH_U32(u32Value); 1708 IEM_MC_ADVANCE_RIP(); 1709 IEM_MC_END(); 1710 break; 1711 1712 case IEMMODE_64BIT: 1713 IEM_MC_BEGIN(0, 1); 1714 IEM_MC_LOCAL(uint64_t, u64Value); 1715 IEM_MC_FETCH_SREG_ZX_U64(u64Value, iReg); 1716 IEM_MC_PUSH_U64(u64Value); 1717 IEM_MC_ADVANCE_RIP(); 1718 IEM_MC_END(); 1719 break; 1720 } 1721 1722 return VINF_SUCCESS; 1723 } 1724 1725 1680 1726 /** Opcode 0x0f 0xa0. */ 1681 FNIEMOP_STUB(iemOp_push_fs); 1727 FNIEMOP_DEF(iemOp_push_fs) 1728 { 1729 IEMOP_HLP_NO_LOCK_PREFIX(); 1730 return FNIEMOP_CALL_1(iemOpCommonPushSReg, X86_SREG_FS); 1731 } 1732 1733 1682 1734 /** Opcode 0x0f 0xa1. */ 1683 FNIEMOP_STUB(iemOp_pop_fs); 1735 FNIEMOP_DEF(iemOp_pop_fs) 1736 { 1737 IEMOP_HLP_NO_LOCK_PREFIX(); 1738 return IEM_MC_DEFER_TO_CIMPL_2(iemOpCImpl_pop_Sreg, X86_SREG_FS, pIemCpu->enmEffOpSize); 1739 } 1740 1741 1684 1742 /** Opcode 0x0f 0xa2. */ 1685 1743 FNIEMOP_STUB(iemOp_cpuid); … … 1690 1748 /** Opcode 0x0f 0xa7. */ 1691 1749 FNIEMOP_STUB(iemOp_shld_Ev_Gv_CL); 1750 1751 1692 1752 /** Opcode 0x0f 0xa8. */ 1693 FNIEMOP_STUB(iemOp_push_gs); 1753 FNIEMOP_DEF(iemOp_push_gs) 1754 { 1755 IEMOP_HLP_NO_LOCK_PREFIX(); 1756 return FNIEMOP_CALL_1(iemOpCommonPushSReg, X86_SREG_GS); 1757 } 1758 1759 1694 1760 /** Opcode 0x0f 0xa9. */ 1695 FNIEMOP_STUB(iemOp_pop_gs); 1761 FNIEMOP_DEF(iemOp_pop_gs) 1762 { 1763 IEMOP_HLP_NO_LOCK_PREFIX(); 1764 return IEM_MC_DEFER_TO_CIMPL_2(iemOpCImpl_pop_Sreg, X86_SREG_GS, pIemCpu->enmEffOpSize); 1765 } 1766 1767 1696 1768 /** Opcode 0x0f 0xaa. */ 1697 1769 FNIEMOP_STUB(iemOp_rsm); … … 1704 1776 /** Opcode 0x0f 0xae. */ 1705 1777 FNIEMOP_STUB(iemOp_Grp15); 1778 1779 1706 1780 /** Opcode 0x0f 0xaf. */ 1707 FNIEMOP_STUB(iemOp_imul_Gv_Ev); 1781 FNIEMOP_DEF(iemOp_imul_Gv_Ev) 1782 { 1783 IEMOP_MNEMONIC("imul Gv,Ev"); 1784 #ifdef IEM_VERIFICATION_MODE 1785 pIemCpu->fMulDivHack = true; 1786 #endif 1787 return FNIEMOP_CALL_1(iemOpHlpBinaryOperator_rv_rm, &g_iemAImpl_imul_two); 1788 } 1789 1790 1708 1791 /** Opcode 0x0f 0xb0. */ 1709 1792 FNIEMOP_STUB(iemOp_cmpxchg_Eb_Gb); … … 2278 2361 FNIEMOP_DEF(iemOp_add_Ev_Gv) 2279 2362 { 2280 IEMOP_MNEMONIC("add Gv,Ev");2363 IEMOP_MNEMONIC("add Ev,Gv"); 2281 2364 return FNIEMOP_CALL_1(iemOpHlpBinaryOperator_rm_rv, &g_iemAImpl_add); 2282 2365 } … … 2312 2395 IEMOP_MNEMONIC("add rAX,Iz"); 2313 2396 return FNIEMOP_CALL_1(iemOpHlpBinaryOperator_rAX_Iz, &g_iemAImpl_add); 2314 }2315 2316 2317 /**2318 * Common 'push segment-register' helper.2319 */2320 FNIEMOP_DEF_1(iemOpCommonPushSReg, uint8_t, iReg)2321 {2322 IEMOP_HLP_NO_LOCK_PREFIX();2323 if (iReg < X86_SREG_FS)2324 IEMOP_HLP_NO_64BIT();2325 IEMOP_HLP_DEFAULT_64BIT_OP_SIZE();2326 2327 switch (pIemCpu->enmEffOpSize)2328 {2329 case IEMMODE_16BIT:2330 IEM_MC_BEGIN(0, 1);2331 IEM_MC_LOCAL(uint16_t, u16Value);2332 IEM_MC_FETCH_SREG_U16(u16Value, iReg);2333 IEM_MC_PUSH_U16(u16Value);2334 IEM_MC_ADVANCE_RIP();2335 IEM_MC_END();2336 break;2337 2338 case IEMMODE_32BIT:2339 IEM_MC_BEGIN(0, 1);2340 IEM_MC_LOCAL(uint32_t, u32Value);2341 IEM_MC_FETCH_SREG_ZX_U32(u32Value, iReg);2342 IEM_MC_PUSH_U32(u32Value);2343 IEM_MC_ADVANCE_RIP();2344 IEM_MC_END();2345 break;2346 2347 case IEMMODE_64BIT:2348 IEM_MC_BEGIN(0, 1);2349 IEM_MC_LOCAL(uint64_t, u64Value);2350 IEM_MC_FETCH_SREG_ZX_U64(u64Value, iReg);2351 IEM_MC_PUSH_U64(u64Value);2352 IEM_MC_ADVANCE_RIP();2353 IEM_MC_END();2354 break;2355 }2356 2357 return VINF_SUCCESS;2358 2397 } 2359 2398 … … 6412 6451 IEM_MC_REF_GREG_U8(pu8Dst, (bRm & X86_MODRM_RM_MASK) | pIemCpu->uRexB); 6413 6452 IEM_MC_REF_EFLAGS(pEFlags); 6453 #ifdef IEM_VERIFICATION_MODE 6454 if (cShift > 1) pIemCpu->fShiftOfHack = true; 6455 #endif 6414 6456 IEM_MC_CALL_VOID_AIMPL_3(pImpl->pfnNormalU8, pu8Dst, cShiftArg, pEFlags); 6415 6457 IEM_MC_ADVANCE_RIP(); … … 6431 6473 IEM_MC_MEM_MAP(pu8Dst, IEM_ACCESS_DATA_RW, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); 6432 6474 IEM_MC_FETCH_EFLAGS(EFlags); 6475 #ifdef IEM_VERIFICATION_MODE 6476 if (cShift > 1) pIemCpu->fShiftOfHack = true; 6477 #endif 6433 6478 IEM_MC_CALL_VOID_AIMPL_3(pImpl->pfnNormalU8, pu8Dst, cShiftArg, pEFlags); 6434 6479 … … 6453 6498 case 2: pImpl = &g_iemAImpl_rcl; IEMOP_MNEMONIC("rcl Ev,Ib"); break; 6454 6499 case 3: pImpl = &g_iemAImpl_rcr; IEMOP_MNEMONIC("rcr Ev,Ib"); break; 6455 case 4: 6456 pImpl = &g_iemAImpl_shl; IEMOP_MNEMONIC("shl Ev,Ib"); 6457 #ifdef IEM_VERIFICATION_MODE 6458 pIemCpu->fShlHack = true; 6459 #endif 6460 break; 6500 case 4: pImpl = &g_iemAImpl_shl; IEMOP_MNEMONIC("shl Ev,Ib"); break; 6461 6501 case 5: pImpl = &g_iemAImpl_shr; IEMOP_MNEMONIC("shr Ev,Ib"); break; 6462 6502 case 7: pImpl = &g_iemAImpl_sar; IEMOP_MNEMONIC("sar Ev,Ib"); break; … … 6469 6509 /* register */ 6470 6510 uint8_t cShift; IEM_OPCODE_GET_NEXT_BYTE(pIemCpu, &cShift); 6511 #ifdef IEM_VERIFICATION_MODE 6512 if (cShift > 1) pIemCpu->fShiftOfHack = true; 6513 #endif 6471 6514 IEMOP_HLP_NO_LOCK_PREFIX(); 6472 6515 switch (pIemCpu->enmEffOpSize) … … 6526 6569 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 6527 6570 uint8_t cShift; IEM_OPCODE_GET_NEXT_BYTE(pIemCpu, &cShift); 6571 #ifdef IEM_VERIFICATION_MODE 6572 if (cShift > 1) pIemCpu->fShiftOfHack = true; 6573 #endif 6528 6574 IEM_MC_ASSIGN(cShiftArg, cShift); 6529 6575 IEM_MC_MEM_MAP(pu16Dst, IEM_ACCESS_DATA_RW, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); … … 6546 6592 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 6547 6593 uint8_t cShift; IEM_OPCODE_GET_NEXT_BYTE(pIemCpu, &cShift); 6594 #ifdef IEM_VERIFICATION_MODE 6595 if (cShift > 1) pIemCpu->fShiftOfHack = true; 6596 #endif 6548 6597 IEM_MC_ASSIGN(cShiftArg, cShift); 6549 6598 IEM_MC_MEM_MAP(pu32Dst, IEM_ACCESS_DATA_RW, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); … … 6566 6615 IEM_MC_CALC_RM_EFF_ADDR(GCPtrEffDst, bRm); 6567 6616 uint8_t cShift; IEM_OPCODE_GET_NEXT_BYTE(pIemCpu, &cShift); 6617 #ifdef IEM_VERIFICATION_MODE 6618 if (cShift > 1) pIemCpu->fShiftOfHack = true; 6619 #endif 6568 6620 IEM_MC_ASSIGN(cShiftArg, cShift); 6569 6621 IEM_MC_MEM_MAP(pu64Dst, IEM_ACCESS_DATA_RW, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); … … 6576 6628 IEM_MC_END(); 6577 6629 return VINF_SUCCESS; 6578 6579 6630 6580 6631 IEM_NOT_REACHED_DEFAULT_CASE_RET(); … … 6869 6920 case 2: pImpl = &g_iemAImpl_rcl; IEMOP_MNEMONIC("rcl Ev,1"); break; 6870 6921 case 3: pImpl = &g_iemAImpl_rcr; IEMOP_MNEMONIC("rcr Ev,1"); break; 6871 case 4: 6872 pImpl = &g_iemAImpl_shl; IEMOP_MNEMONIC("shl Ev,1"); 6873 #ifdef IEM_VERIFICATION_MODE 6874 pIemCpu->fShlHack = true; 6875 #endif 6876 break; 6922 case 4: pImpl = &g_iemAImpl_shl; IEMOP_MNEMONIC("shl Ev,1"); break; 6877 6923 case 5: pImpl = &g_iemAImpl_shr; IEMOP_MNEMONIC("shr Ev,1"); break; 6878 6924 case 7: pImpl = &g_iemAImpl_sar; IEMOP_MNEMONIC("sar Ev,1"); break; … … 7021 7067 IEM_MC_FETCH_GREG_U8(cShiftArg, X86_GREG_xCX); 7022 7068 IEM_MC_REF_EFLAGS(pEFlags); 7069 #ifdef IEM_VERIFICATION_MODE 7070 if (cShiftArg > 1) pIemCpu->fShiftOfHack = true; 7071 #endif 7023 7072 IEM_MC_CALL_VOID_AIMPL_3(pImpl->pfnNormalU8, pu8Dst, cShiftArg, pEFlags); 7024 7073 IEM_MC_ADVANCE_RIP(); … … 7039 7088 IEM_MC_MEM_MAP(pu8Dst, IEM_ACCESS_DATA_RW, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); 7040 7089 IEM_MC_FETCH_EFLAGS(EFlags); 7090 #ifdef IEM_VERIFICATION_MODE 7091 if (cShiftArg > 1) pIemCpu->fShiftOfHack = true; 7092 #endif 7041 7093 IEM_MC_CALL_VOID_AIMPL_3(pImpl->pfnNormalU8, pu8Dst, cShiftArg, pEFlags); 7042 7094 … … 7061 7113 case 2: pImpl = &g_iemAImpl_rcl; IEMOP_MNEMONIC("rcl Ev,CL"); break; 7062 7114 case 3: pImpl = &g_iemAImpl_rcr; IEMOP_MNEMONIC("rcr Ev,CL"); break; 7063 case 4: 7064 pImpl = &g_iemAImpl_shl; IEMOP_MNEMONIC("shl Ev,CL"); 7065 #ifdef IEM_VERIFICATION_MODE 7066 pIemCpu->fShlHack = true; 7067 #endif 7068 break; 7115 case 4: pImpl = &g_iemAImpl_shl; IEMOP_MNEMONIC("shl Ev,CL"); break; 7069 7116 case 5: pImpl = &g_iemAImpl_shr; IEMOP_MNEMONIC("shr Ev,CL"); break; 7070 7117 case 7: pImpl = &g_iemAImpl_sar; IEMOP_MNEMONIC("sar Ev,CL"); break; … … 7087 7134 IEM_MC_FETCH_GREG_U8(cShiftArg, X86_GREG_xCX); 7088 7135 IEM_MC_REF_EFLAGS(pEFlags); 7136 #ifdef IEM_VERIFICATION_MODE 7137 if (cShiftArg > 1) pIemCpu->fShiftOfHack = true; 7138 #endif 7089 7139 IEM_MC_CALL_VOID_AIMPL_3(pImpl->pfnNormalU16, pu16Dst, cShiftArg, pEFlags); 7090 7140 IEM_MC_ADVANCE_RIP(); … … 7100 7150 IEM_MC_FETCH_GREG_U8(cShiftArg, X86_GREG_xCX); 7101 7151 IEM_MC_REF_EFLAGS(pEFlags); 7152 #ifdef IEM_VERIFICATION_MODE 7153 if (cShiftArg > 1) pIemCpu->fShiftOfHack = true; 7154 #endif 7102 7155 IEM_MC_CALL_VOID_AIMPL_3(pImpl->pfnNormalU32, pu32Dst, cShiftArg, pEFlags); 7103 7156 IEM_MC_ADVANCE_RIP(); … … 7113 7166 IEM_MC_FETCH_GREG_U8(cShiftArg, X86_GREG_xCX); 7114 7167 IEM_MC_REF_EFLAGS(pEFlags); 7168 #ifdef IEM_VERIFICATION_MODE 7169 if (cShiftArg > 1) pIemCpu->fShiftOfHack = true; 7170 #endif 7115 7171 IEM_MC_CALL_VOID_AIMPL_3(pImpl->pfnNormalU64, pu64Dst, cShiftArg, pEFlags); 7116 7172 IEM_MC_ADVANCE_RIP(); … … 7138 7194 IEM_MC_MEM_MAP(pu16Dst, IEM_ACCESS_DATA_RW, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); 7139 7195 IEM_MC_FETCH_EFLAGS(EFlags); 7196 #ifdef IEM_VERIFICATION_MODE 7197 if (cShiftArg > 1) pIemCpu->fShiftOfHack = true; 7198 #endif 7140 7199 IEM_MC_CALL_VOID_AIMPL_3(pImpl->pfnNormalU16, pu16Dst, cShiftArg, pEFlags); 7141 7200 … … 7157 7216 IEM_MC_MEM_MAP(pu32Dst, IEM_ACCESS_DATA_RW, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); 7158 7217 IEM_MC_FETCH_EFLAGS(EFlags); 7218 #ifdef IEM_VERIFICATION_MODE 7219 if (cShiftArg > 1) pIemCpu->fShiftOfHack = true; 7220 #endif 7159 7221 IEM_MC_CALL_VOID_AIMPL_3(pImpl->pfnNormalU32, pu32Dst, cShiftArg, pEFlags); 7160 7222 … … 7176 7238 IEM_MC_MEM_MAP(pu64Dst, IEM_ACCESS_DATA_RW, pIemCpu->iEffSeg, GCPtrEffDst, 0 /*arg*/); 7177 7239 IEM_MC_FETCH_EFLAGS(EFlags); 7240 #ifdef IEM_VERIFICATION_MODE 7241 if (cShiftArg > 1) pIemCpu->fShiftOfHack = true; 7242 #endif 7178 7243 IEM_MC_CALL_VOID_AIMPL_3(pImpl->pfnNormalU64, pu64Dst, cShiftArg, pEFlags); 7179 7244 -
trunk/src/VBox/VMM/include/IEMInternal.h
r36815 r36821 167 167 /** Hack for ignoring differences in undefined EFLAGS after MUL and DIV. */ 168 168 bool fMulDivHack; 169 /** Hack for ignoring differences in OF after SHL. At least two intel CPUs170 * this code is running on will not set it correctly (i.e. like AMD and QEMU171 * does). */172 bool fSh lHack;169 /** Hack for ignoring differences in OF after shifts greater than 1 bit. 170 * At least two intel CPUs this code is running on will set it different 171 * than what AMD and REM does. */ 172 bool fShiftOfHack; 173 173 bool afAlignment1[6]; 174 /** The physical address corresponding to abOpcodes[0]. */ 175 RTGCPHYS GCPhysOpcodes; 174 176 #endif 175 177 /** @} */ … … 199 201 uint8_t iEffSeg; 200 202 201 /** The current offset into abOpcode . */203 /** The current offset into abOpcodes. */ 202 204 uint8_t offOpcode; 203 /** The size of what has currently been fetched into abOpcode . */205 /** The size of what has currently been fetched into abOpcodes. */ 204 206 uint8_t cbOpcode; 205 207 /** The opcode bytes. */ … … 453 455 /** @name Signed multiplication operations (thrown in with the binary ops). 454 456 * @{ */ 455 FNIEMAIMPLBINU8 iemAImpl_imul_two_u8;456 457 FNIEMAIMPLBINU16 iemAImpl_imul_two_u16; 457 458 FNIEMAIMPLBINU32 iemAImpl_imul_two_u32;
Note:
See TracChangeset
for help on using the changeset viewer.