Changeset 62076 in vbox for trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
- Timestamp:
- Jul 6, 2016 4:37:04 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 108548
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r62015 r62076 176 176 static void iemHlpUpdateArithEFlagsU8(PVMCPU pVCpu, uint8_t u8Result, uint32_t fToUpdate, uint32_t fUndefined) 177 177 { 178 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);178 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 179 179 180 180 uint32_t fEFlags = pCtx->eflags.u; … … 232 232 IEM_CIMPL_DEF_0(iemCImpl_popa_16) 233 233 { 234 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);234 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 235 235 RTGCPTR GCPtrStart = iemRegGetEffRsp(pVCpu, pCtx); 236 236 RTGCPTR GCPtrLast = GCPtrStart + 15; … … 304 304 IEM_CIMPL_DEF_0(iemCImpl_popa_32) 305 305 { 306 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);306 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 307 307 RTGCPTR GCPtrStart = iemRegGetEffRsp(pVCpu, pCtx); 308 308 RTGCPTR GCPtrLast = GCPtrStart + 31; … … 385 385 IEM_CIMPL_DEF_0(iemCImpl_pusha_16) 386 386 { 387 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);387 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 388 388 RTGCPTR GCPtrTop = iemRegGetEffRsp(pVCpu, pCtx); 389 389 RTGCPTR GCPtrBottom = GCPtrTop - 15; … … 457 457 IEM_CIMPL_DEF_0(iemCImpl_pusha_32) 458 458 { 459 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);459 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 460 460 RTGCPTR GCPtrTop = iemRegGetEffRsp(pVCpu, pCtx); 461 461 RTGCPTR GCPtrBottom = GCPtrTop - 31; … … 532 532 IEM_CIMPL_DEF_1(iemCImpl_pushf, IEMMODE, enmEffOpSize) 533 533 { 534 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);534 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 535 535 536 536 /* … … 588 588 IEM_CIMPL_DEF_1(iemCImpl_popf, IEMMODE, enmEffOpSize) 589 589 { 590 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);590 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 591 591 uint32_t const fEflOld = IEMMISC_GET_EFL(pVCpu, pCtx); 592 592 VBOXSTRICTRC rcStrict; … … 748 748 IEM_CIMPL_DEF_1(iemCImpl_call_16, uint16_t, uNewPC) 749 749 { 750 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);750 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 751 751 uint16_t uOldPC = pCtx->ip + cbInstr; 752 752 if (uNewPC > pCtx->cs.u32Limit) … … 773 773 IEM_CIMPL_DEF_1(iemCImpl_call_rel_16, int16_t, offDisp) 774 774 { 775 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);775 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 776 776 uint16_t uOldPC = pCtx->ip + cbInstr; 777 777 uint16_t uNewPC = uOldPC + offDisp; … … 801 801 IEM_CIMPL_DEF_1(iemCImpl_call_32, uint32_t, uNewPC) 802 802 { 803 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);803 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 804 804 uint32_t uOldPC = pCtx->eip + cbInstr; 805 805 if (uNewPC > pCtx->cs.u32Limit) … … 843 843 IEM_CIMPL_DEF_1(iemCImpl_call_rel_32, int32_t, offDisp) 844 844 { 845 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);845 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 846 846 uint32_t uOldPC = pCtx->eip + cbInstr; 847 847 uint32_t uNewPC = uOldPC + offDisp; … … 871 871 IEM_CIMPL_DEF_1(iemCImpl_call_64, uint64_t, uNewPC) 872 872 { 873 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);873 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 874 874 uint64_t uOldPC = pCtx->rip + cbInstr; 875 875 if (!IEM_IS_CANONICAL(uNewPC)) … … 896 896 IEM_CIMPL_DEF_1(iemCImpl_call_rel_64, int64_t, offDisp) 897 897 { 898 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);898 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 899 899 uint64_t uOldPC = pCtx->rip + cbInstr; 900 900 uint64_t uNewPC = uOldPC + offDisp; … … 951 951 } 952 952 953 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);953 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 954 954 uint32_t uNextEip = pCtx->eip + cbInstr; 955 return iemTaskSwitch(pVCpu, p VCpu->iem.s.CTX_SUFF(pCtx), enmBranch == IEMBRANCH_JUMP ? IEMTASKSWITCH_JUMP : IEMTASKSWITCH_CALL,955 return iemTaskSwitch(pVCpu, pCtx, enmBranch == IEMBRANCH_JUMP ? IEMTASKSWITCH_JUMP : IEMTASKSWITCH_CALL, 956 956 uNextEip, 0 /* fFlags */, 0 /* uErr */, 0 /* uCr2 */, uSel, pDesc); 957 957 #endif … … 1020 1020 } 1021 1021 1022 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);1022 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 1023 1023 uint32_t uNextEip = pCtx->eip + cbInstr; 1024 return iemTaskSwitch(pVCpu, p VCpu->iem.s.CTX_SUFF(pCtx), enmBranch == IEMBRANCH_JUMP ? IEMTASKSWITCH_JUMP : IEMTASKSWITCH_CALL,1024 return iemTaskSwitch(pVCpu, pCtx, enmBranch == IEMBRANCH_JUMP ? IEMTASKSWITCH_JUMP : IEMTASKSWITCH_CALL, 1025 1025 uNextEip, 0 /* fFlags */, 0 /* uErr */, 0 /* uCr2 */, uSelTss, &TssDesc); 1026 1026 #endif … … 1061 1061 RTSEL uNewCS; 1062 1062 IEMSELDESC DescCS; 1063 PCPUMCTX pCtx;1064 1063 1065 1064 AssertCompile(X86_SEL_TYPE_SYS_386_CALL_GATE == AMD64_SEL_TYPE_SYS_CALL_GATE); … … 1163 1162 } 1164 1163 1165 pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);1164 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 1166 1165 1167 1166 if (enmBranch == IEMBRANCH_JUMP) … … 1723 1722 IEM_CIMPL_DEF_3(iemCImpl_FarJmp, uint16_t, uSel, uint64_t, offSeg, IEMMODE, enmEffOpSize) 1724 1723 { 1725 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);1724 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 1726 1725 NOREF(cbInstr); 1727 1726 Assert(offSeg <= UINT32_MAX); … … 1888 1887 IEM_CIMPL_DEF_3(iemCImpl_callf, uint16_t, uSel, uint64_t, offSeg, IEMMODE, enmEffOpSize) 1889 1888 { 1890 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);1889 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 1891 1890 VBOXSTRICTRC rcStrict; 1892 1891 uint64_t uNewRsp; … … 2109 2108 IEM_CIMPL_DEF_2(iemCImpl_retf, IEMMODE, enmEffOpSize, uint16_t, cbPop) 2110 2109 { 2111 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);2110 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 2112 2111 VBOXSTRICTRC rcStrict; 2113 2112 RTCPTRUNION uPtrFrame; … … 2515 2514 IEM_CIMPL_DEF_2(iemCImpl_retn, IEMMODE, enmEffOpSize, uint16_t, cbPop) 2516 2515 { 2517 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);2516 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 2518 2517 NOREF(cbInstr); 2519 2518 … … 2587 2586 IEM_CIMPL_DEF_3(iemCImpl_enter, IEMMODE, enmEffOpSize, uint16_t, cbFrame, uint8_t, cParameters) 2588 2587 { 2589 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);2588 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 2590 2589 2591 2590 /* Push RBP, saving the old value in TmpRbp. */ … … 2703 2702 IEM_CIMPL_DEF_1(iemCImpl_leave, IEMMODE, enmEffOpSize) 2704 2703 { 2705 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);2704 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 2706 2705 2707 2706 /* Calculate the intermediate RSP from RBP and the stack attributes. */ … … 2774 2773 IEM_CIMPL_DEF_1(iemCImpl_iret_real_v8086, IEMMODE, enmEffOpSize) 2775 2774 { 2776 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);2775 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 2777 2776 X86EFLAGS Efl; 2778 2777 Efl.u = IEMMISC_GET_EFL(pVCpu, pCtx); … … 2994 2993 */ 2995 2994 RTSEL uSelRet; 2996 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);2995 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 2997 2996 VBOXSTRICTRC rcStrict = iemMemFetchSysU16(pVCpu, &uSelRet, UINT8_MAX, pCtx->tr.u64Base); 2998 2997 if (rcStrict != VINF_SUCCESS) … … 3033 3032 3034 3033 uint32_t uNextEip = pCtx->eip + cbInstr; 3035 return iemTaskSwitch(pVCpu, p VCpu->iem.s.CTX_SUFF(pCtx), IEMTASKSWITCH_IRET, uNextEip, 0 /* fFlags */, 0 /* uErr */,3034 return iemTaskSwitch(pVCpu, pCtx, IEMTASKSWITCH_IRET, uNextEip, 0 /* fFlags */, 0 /* uErr */, 3036 3035 0 /* uCr2 */, uSelRet, &TssDesc); 3037 3036 #endif … … 3046 3045 IEM_CIMPL_DEF_1(iemCImpl_iret_prot, IEMMODE, enmEffOpSize) 3047 3046 { 3048 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);3047 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 3049 3048 NOREF(cbInstr); 3050 3049 Assert(enmEffOpSize == IEMMODE_32BIT || enmEffOpSize == IEMMODE_16BIT); … … 3421 3420 IEM_CIMPL_DEF_1(iemCImpl_iret_64bit, IEMMODE, enmEffOpSize) 3422 3421 { 3423 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);3422 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 3424 3423 NOREF(cbInstr); 3425 3424 … … 3744 3743 IEM_CIMPL_DEF_0(iemCImpl_syscall) 3745 3744 { 3746 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);3745 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 3747 3746 3748 3747 /* … … 3846 3845 3847 3846 { 3848 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);3847 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 3849 3848 3850 3849 /* … … 3952 3951 IEM_CIMPL_DEF_2(iemCImpl_LoadSReg, uint8_t, iSegReg, uint16_t, uSel) 3953 3952 { 3954 /*PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);*/3953 /*PCPUMCTX pCtx = IEM_GET_CTX(pVCpu);*/ 3955 3954 uint16_t *pSel = iemSRegRef(pVCpu, iSegReg); 3956 3955 PCPUMSELREGHID pHid = iemSRegGetHid(pVCpu, iSegReg); … … 4142 4141 if (iSegReg == X86_SREG_SS) 4143 4142 { 4144 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);4143 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 4145 4144 EMSetInhibitInterruptsPC(pVCpu, pCtx->rip); 4146 4145 } … … 4158 4157 IEM_CIMPL_DEF_2(iemCImpl_pop_Sreg, uint8_t, iSegReg, IEMMODE, enmEffOpSize) 4159 4158 { 4160 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);4159 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 4161 4160 VBOXSTRICTRC rcStrict; 4162 4161 … … 4220 4219 IEMMODE, enmEffOpSize) 4221 4220 { 4222 /*PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);*/4221 /*PCPUMCTX pCtx = IEM_GET_CTX(pVCpu);*/ 4223 4222 VBOXSTRICTRC rcStrict; 4224 4223 … … 4271 4270 4272 4271 /* Within the table limits? */ 4273 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);4272 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 4274 4273 RTGCPTR GCPtrBase; 4275 4274 if (uSel & X86_SEL_LDT) … … 4351 4350 4352 4351 /* commit */ 4353 pVCpu->iem.s.CTX_SUFF(pCtx)->eflags.Bits.u1ZF = fAccessible;4352 IEM_GET_CTX(pVCpu)->eflags.Bits.u1ZF = fAccessible; 4354 4353 4355 4354 iemRegAddToRipAndClearRF(pVCpu, cbInstr); … … 4383 4382 if (!Desc.Legacy.Gen.u1DescType) 4384 4383 { 4385 if (CPUMIsGuestInLongModeEx( pVCpu->iem.s.CTX_SUFF(pCtx)))4384 if (CPUMIsGuestInLongModeEx(IEM_GET_CTX(pVCpu))) 4386 4385 { 4387 4386 if (Desc.Long.Gen.u5Zeros) … … 4458 4457 4459 4458 /* commit flags value and advance rip. */ 4460 pVCpu->iem.s.CTX_SUFF(pCtx)->eflags.Bits.u1ZF = fDescOk;4459 IEM_GET_CTX(pVCpu)->eflags.Bits.u1ZF = fDescOk; 4461 4460 iemRegAddToRipAndClearRF(pVCpu, cbInstr); 4462 4461 … … 4494 4493 if (pVCpu->iem.s.uCpl != 0) 4495 4494 return iemRaiseGeneralProtectionFault0(pVCpu); 4496 Assert(! pVCpu->iem.s.CTX_SUFF(pCtx)->eflags.Bits.u1VM);4495 Assert(!IEM_GET_CTX(pVCpu)->eflags.Bits.u1VM); 4497 4496 4498 4497 /* … … 4511 4510 else 4512 4511 { 4513 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);4512 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 4514 4513 pCtx->gdtr.cbGdt = cbLimit; 4515 4514 pCtx->gdtr.pGdt = GCPtrBase; … … 4541 4540 * you really must know. 4542 4541 */ 4543 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);4542 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 4544 4543 VBOXSTRICTRC rcStrict = iemMemStoreDataXdtr(pVCpu, pCtx->gdtr.cbGdt, pCtx->gdtr.pGdt, iEffSeg, GCPtrEffDst); 4545 4544 if (rcStrict == VINF_SUCCESS) … … 4560 4559 if (pVCpu->iem.s.uCpl != 0) 4561 4560 return iemRaiseGeneralProtectionFault0(pVCpu); 4562 Assert(! pVCpu->iem.s.CTX_SUFF(pCtx)->eflags.Bits.u1VM);4561 Assert(!IEM_GET_CTX(pVCpu)->eflags.Bits.u1VM); 4563 4562 4564 4563 /* … … 4577 4576 else 4578 4577 { 4579 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);4578 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 4580 4579 pCtx->idtr.cbIdt = cbLimit; 4581 4580 pCtx->idtr.pIdt = GCPtrBase; … … 4606 4605 * you really must know. 4607 4606 */ 4608 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);4607 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 4609 4608 VBOXSTRICTRC rcStrict = iemMemStoreDataXdtr(pVCpu, pCtx->idtr.cbIdt, pCtx->idtr.pIdt, iEffSeg, GCPtrEffDst); 4610 4609 if (rcStrict == VINF_SUCCESS) … … 4621 4620 IEM_CIMPL_DEF_1(iemCImpl_lldt, uint16_t, uNewLdt) 4622 4621 { 4623 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);4622 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 4624 4623 4625 4624 /* … … 4747 4746 IEM_CIMPL_DEF_1(iemCImpl_ltr, uint16_t, uNewTr) 4748 4747 { 4749 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);4748 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 4750 4749 4751 4750 /* … … 4869 4868 IEM_CIMPL_DEF_2(iemCImpl_mov_Rd_Cd, uint8_t, iGReg, uint8_t, iCrReg) 4870 4869 { 4871 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);4870 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 4872 4871 if (pVCpu->iem.s.uCpl != 0) 4873 4872 return iemRaiseGeneralProtectionFault0(pVCpu); … … 4918 4917 IEM_CIMPL_DEF_2(iemCImpl_load_CrX, uint8_t, iCrReg, uint64_t, uNewCrX) 4919 4918 { 4920 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);4919 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 4921 4920 VBOXSTRICTRC rcStrict; 4922 4921 int rc; … … 5233 5232 if (pVCpu->iem.s.uCpl != 0) 5234 5233 return iemRaiseGeneralProtectionFault0(pVCpu); 5235 Assert(! pVCpu->iem.s.CTX_SUFF(pCtx)->eflags.Bits.u1VM);5234 Assert(!IEM_GET_CTX(pVCpu)->eflags.Bits.u1VM); 5236 5235 5237 5236 /* … … 5254 5253 IEM_CIMPL_DEF_1(iemCImpl_lmsw, uint16_t, u16NewMsw) 5255 5254 { 5256 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);5255 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 5257 5256 5258 5257 if (pVCpu->iem.s.uCpl != 0) … … 5277 5276 return iemRaiseGeneralProtectionFault0(pVCpu); 5278 5277 5279 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);5278 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 5280 5279 uint64_t uNewCr0 = pCtx->cr0; 5281 5280 uNewCr0 &= ~X86_CR0_TS; … … 5292 5291 IEM_CIMPL_DEF_2(iemCImpl_mov_Rd_Dd, uint8_t, iGReg, uint8_t, iDrReg) 5293 5292 { 5294 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);5293 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 5295 5294 5296 5295 /* … … 5360 5359 IEM_CIMPL_DEF_2(iemCImpl_mov_Dd_Rd, uint8_t, iDrReg, uint8_t, iGReg) 5361 5360 { 5362 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);5361 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 5363 5362 5364 5363 /* … … 5459 5458 if (pVCpu->iem.s.uCpl != 0) 5460 5459 return iemRaiseGeneralProtectionFault0(pVCpu); 5461 Assert(! pVCpu->iem.s.CTX_SUFF(pCtx)->eflags.Bits.u1VM);5460 Assert(!IEM_GET_CTX(pVCpu)->eflags.Bits.u1VM); 5462 5461 5463 5462 int rc = PGMInvalidatePage(pVCpu, GCPtrPage); … … 5480 5479 IEM_CIMPL_DEF_0(iemCImpl_rdtsc) 5481 5480 { 5482 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);5481 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 5483 5482 5484 5483 /* … … 5515 5514 IEM_CIMPL_DEF_0(iemCImpl_rdmsr) 5516 5515 { 5517 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);5516 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 5518 5517 5519 5518 /* … … 5564 5563 IEM_CIMPL_DEF_0(iemCImpl_wrmsr) 5565 5564 { 5566 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);5565 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 5567 5566 5568 5567 /* … … 5630 5629 IEM_CIMPL_DEF_2(iemCImpl_in, uint16_t, u16Port, uint8_t, cbReg) 5631 5630 { 5632 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);5631 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 5633 5632 5634 5633 /* … … 5688 5687 IEM_CIMPL_DEF_1(iemCImpl_in_eAX_DX, uint8_t, cbReg) 5689 5688 { 5690 return IEM_CIMPL_CALL_2(iemCImpl_in, pVCpu->iem.s.CTX_SUFF(pCtx)->dx, cbReg);5689 return IEM_CIMPL_CALL_2(iemCImpl_in, IEM_GET_CTX(pVCpu)->dx, cbReg); 5691 5690 } 5692 5691 … … 5700 5699 IEM_CIMPL_DEF_2(iemCImpl_out, uint16_t, u16Port, uint8_t, cbReg) 5701 5700 { 5702 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);5701 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 5703 5702 5704 5703 /* … … 5757 5756 IEM_CIMPL_DEF_1(iemCImpl_out_DX_eAX, uint8_t, cbReg) 5758 5757 { 5759 return IEM_CIMPL_CALL_2(iemCImpl_out, pVCpu->iem.s.CTX_SUFF(pCtx)->dx, cbReg);5758 return IEM_CIMPL_CALL_2(iemCImpl_out, IEM_GET_CTX(pVCpu)->dx, cbReg); 5760 5759 } 5761 5760 … … 5766 5765 IEM_CIMPL_DEF_0(iemCImpl_cli) 5767 5766 { 5768 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);5767 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 5769 5768 uint32_t fEfl = IEMMISC_GET_EFL(pVCpu, pCtx); 5770 5769 uint32_t const fEflOld = fEfl; … … 5808 5807 IEM_CIMPL_DEF_0(iemCImpl_sti) 5809 5808 { 5810 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);5809 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 5811 5810 uint32_t fEfl = IEMMISC_GET_EFL(pVCpu, pCtx); 5812 5811 uint32_t const fEflOld = fEfl; … … 5884 5883 * Gather the operands and validate them. 5885 5884 */ 5886 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);5885 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 5887 5886 RTGCPTR GCPtrMem = pVCpu->iem.s.enmCpuMode == IEMMODE_64BIT ? pCtx->rax : pCtx->eax; 5888 5887 uint32_t uEcx = pCtx->ecx; … … 5940 5939 * Gather the operands and validate them. 5941 5940 */ 5942 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);5941 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 5943 5942 uint32_t uEax = pCtx->eax; 5944 5943 uint32_t uEcx = pCtx->ecx; … … 5991 5990 * Do the job. 5992 5991 */ 5993 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);5992 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 5994 5993 uint64_t uOtherGsBase = pCtx->msrKERNELGSBASE; 5995 5994 pCtx->msrKERNELGSBASE = pCtx->gs.u64Base; … … 6006 6005 IEM_CIMPL_DEF_0(iemCImpl_cpuid) 6007 6006 { 6008 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);6007 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 6009 6008 6010 6009 CPUMGetGuestCpuId(pVCpu, pCtx->eax, pCtx->ecx, &pCtx->eax, &pCtx->ebx, &pCtx->ecx, &pCtx->edx); … … 6026 6025 IEM_CIMPL_DEF_1(iemCImpl_aad, uint8_t, bImm) 6027 6026 { 6028 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);6027 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 6029 6028 6030 6029 uint16_t const ax = pCtx->ax; … … 6047 6046 IEM_CIMPL_DEF_1(iemCImpl_aam, uint8_t, bImm) 6048 6047 { 6049 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);6048 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 6050 6049 Assert(bImm != 0); /* #DE on 0 is handled in the decoder. */ 6051 6050 … … 6068 6067 IEM_CIMPL_DEF_0(iemCImpl_daa) 6069 6068 { 6070 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);6069 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 6071 6070 6072 6071 uint8_t const al = pCtx->al; … … 6101 6100 IEM_CIMPL_DEF_0(iemCImpl_das) 6102 6101 { 6103 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);6102 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 6104 6103 6105 6104 uint8_t const uInputAL = pCtx->al; … … 6180 6179 IEM_CIMPL_DEF_0(iemCImpl_xgetbv) 6181 6180 { 6182 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);6181 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 6183 6182 if (pCtx->cr4 & X86_CR4_OSXSAVE) 6184 6183 { … … 6211 6210 IEM_CIMPL_DEF_0(iemCImpl_xsetbv) 6212 6211 { 6213 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);6212 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 6214 6213 if (pCtx->cr4 & X86_CR4_OSXSAVE) 6215 6214 { … … 6258 6257 IEM_CIMPL_DEF_1(iemCImpl_finit, bool, fCheckXcpts) 6259 6258 { 6260 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);6259 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 6261 6260 6262 6261 if (pCtx->cr0 & (X86_CR0_EM | X86_CR0_TS)) … … 6295 6294 IEM_CIMPL_DEF_3(iemCImpl_fxsave, uint8_t, iEffSeg, RTGCPTR, GCPtrEff, IEMMODE, enmEffOpSize) 6296 6295 { 6297 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);6296 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 6298 6297 6299 6298 /* … … 6399 6398 IEM_CIMPL_DEF_3(iemCImpl_fxrstor, uint8_t, iEffSeg, RTGCPTR, GCPtrEff, IEMMODE, enmEffOpSize) 6400 6399 { 6401 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);6400 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 6402 6401 6403 6402 /* … … 6647 6646 IEM_CIMPL_DEF_3(iemCImpl_fnstenv, IEMMODE, enmEffOpSize, uint8_t, iEffSeg, RTGCPTR, GCPtrEffDst) 6648 6647 { 6649 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);6648 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 6650 6649 RTPTRUNION uPtr; 6651 6650 VBOXSTRICTRC rcStrict = iemMemMap(pVCpu, &uPtr.pv, enmEffOpSize == IEMMODE_16BIT ? 14 : 28, … … 6674 6673 IEM_CIMPL_DEF_3(iemCImpl_fnsave, IEMMODE, enmEffOpSize, uint8_t, iEffSeg, RTGCPTR, GCPtrEffDst) 6675 6674 { 6676 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);6675 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 6677 6676 RTPTRUNION uPtr; 6678 6677 VBOXSTRICTRC rcStrict = iemMemMap(pVCpu, &uPtr.pv, enmEffOpSize == IEMMODE_16BIT ? 94 : 108, … … 6725 6724 IEM_CIMPL_DEF_3(iemCImpl_fldenv, IEMMODE, enmEffOpSize, uint8_t, iEffSeg, RTGCPTR, GCPtrEffSrc) 6726 6725 { 6727 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);6726 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 6728 6727 RTCPTRUNION uPtr; 6729 6728 VBOXSTRICTRC rcStrict = iemMemMap(pVCpu, (void **)&uPtr.pv, enmEffOpSize == IEMMODE_16BIT ? 14 : 28, … … 6752 6751 IEM_CIMPL_DEF_3(iemCImpl_frstor, IEMMODE, enmEffOpSize, uint8_t, iEffSeg, RTGCPTR, GCPtrEffSrc) 6753 6752 { 6754 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);6753 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 6755 6754 RTCPTRUNION uPtr; 6756 6755 VBOXSTRICTRC rcStrict = iemMemMap(pVCpu, (void **)&uPtr.pv, enmEffOpSize == IEMMODE_16BIT ? 94 : 108, … … 6787 6786 IEM_CIMPL_DEF_1(iemCImpl_fldcw, uint16_t, u16Fcw) 6788 6787 { 6789 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);6788 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 6790 6789 6791 6790 /** @todo Testcase: Check what happens when trying to load X86_FCW_PC_RSVD. */ … … 6813 6812 IEM_CIMPL_DEF_1(iemCImpl_fxch_underflow, uint8_t, iStReg) 6814 6813 { 6815 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);6814 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 6816 6815 6817 6816 PX86FXSTATE pFpuCtx = &pCtx->CTX_SUFF(pXState)->x87; … … 6862 6861 IEM_CIMPL_DEF_3(iemCImpl_fcomi_fucomi, uint8_t, iStReg, PFNIEMAIMPLFPUR80EFL, pfnAImpl, bool, fPop) 6863 6862 { 6864 PCPUMCTX pCtx = pVCpu->iem.s.CTX_SUFF(pCtx);6863 PCPUMCTX pCtx = IEM_GET_CTX(pVCpu); 6865 6864 Assert(iStReg < 8); 6866 6865
Note:
See TracChangeset
for help on using the changeset viewer.