Changeset 46384 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Jun 4, 2013 2:07:49 PM (12 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r46168 r46384 758 758 pIemCpu->enmDefAddrMode = enmMode; /** @todo check if this is correct... */ 759 759 pIemCpu->enmEffAddrMode = enmMode; 760 pIemCpu->enmDefOpSize = enmMode; /** @todo check if this is correct... */ 761 pIemCpu->enmEffOpSize = enmMode; 760 if (enmMode != IEMMODE_64BIT) 761 { 762 pIemCpu->enmDefOpSize = enmMode; /** @todo check if this is correct... */ 763 pIemCpu->enmEffOpSize = enmMode; 764 } 765 else 766 { 767 pIemCpu->enmDefOpSize = IEMMODE_32BIT; 768 pIemCpu->enmEffOpSize = IEMMODE_32BIT; 769 } 762 770 pIemCpu->fPrefixes = 0; 763 771 pIemCpu->uRexReg = 0; … … 7348 7356 7349 7357 /* Get the index and scale it. */ 7350 switch (((bSib & X86_SIB_INDEX_SHIFT) >>X86_SIB_INDEX_SMASK) | pIemCpu->uRexIndex)7358 switch (((bSib >> X86_SIB_INDEX_SHIFT) & X86_SIB_INDEX_SMASK) | pIemCpu->uRexIndex) 7351 7359 { 7352 7360 case 0: u64EffAddr = pCtx->rax; break; … … 7540 7548 #if 0 /* NT4SP1 - frstor [ecx] */ 7541 7549 || (pOrgCtx->cs.Sel == 8 && pOrgCtx->rip == 0x8013d11f) 7550 #endif 7551 #if 0 /* xxxxxx - All long mode code. */ 7552 || (pOrgCtx->msrEFER & MSR_K6_EFER_LMA) 7542 7553 #endif 7543 7554 ) -
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r45701 r46384 605 605 } 606 606 case IEMMODE_32BIT: 607 case IEMMODE_64BIT:608 607 rcStrict = iemMemStackPopU32(pIemCpu, &fEflNew); 609 608 if (rcStrict != VINF_SUCCESS) 610 609 return rcStrict; 611 610 break; 611 case IEMMODE_64BIT: 612 { 613 uint64_t u64Value; 614 rcStrict = iemMemStackPopU64(pIemCpu, &u64Value); 615 if (rcStrict != VINF_SUCCESS) 616 return rcStrict; 617 fEflNew = u64Value; /** @todo testcase: Check exactly what happens if high bits are set. */ 618 break; 619 } 612 620 IEM_NOT_REACHED_DEFAULT_CASE_RET(); 613 621 } … … 3256 3264 uint64_t NewEFER = pCtx->msrEFER; 3257 3265 if (uNewCrX & X86_CR0_PG) 3258 NewEFER |= MSR_K6_EFER_LM E;3266 NewEFER |= MSR_K6_EFER_LMA; 3259 3267 else 3260 NewEFER &= ~MSR_K6_EFER_LM E;3268 NewEFER &= ~MSR_K6_EFER_LMA; 3261 3269 3262 3270 if (!IEM_FULL_VERIFICATION_ENABLED(pIemCpu)) … … 3806 3814 uValue.s.Hi = pCtx->edx; 3807 3815 3808 int rc = CPUMSetGuestMsr(IEMCPU_TO_VMCPU(pIemCpu), pCtx->ecx, uValue.u); 3816 int rc; 3817 if (!IEM_VERIFICATION_ENABLED(pIemCpu)) 3818 rc = CPUMSetGuestMsr(IEMCPU_TO_VMCPU(pIemCpu), pCtx->ecx, uValue.u); 3819 else 3820 { 3821 CPUMCTX CtxTmp = *pCtx; 3822 rc = CPUMSetGuestMsr(IEMCPU_TO_VMCPU(pIemCpu), pCtx->ecx, uValue.u); 3823 PCPUMCTX pCtx2 = CPUMQueryGuestCtxPtr(IEMCPU_TO_VMCPU(pIemCpu)); 3824 *pCtx = *pCtx2; 3825 *pCtx2 = CtxTmp; 3826 } 3809 3827 if (rc != VINF_SUCCESS) 3810 3828 {
Note:
See TracChangeset
for help on using the changeset viewer.