Changeset 74697 in vbox for trunk/src/VBox
- Timestamp:
- Oct 9, 2018 6:32:17 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp.h
r74693 r74697 5274 5274 5275 5275 /** 5276 * Implements smsw GReg 5276 * Implements smsw GReg. 5277 5277 * 5278 5278 * @param iGReg The general register to store the CRx value in. … … 5282 5282 { 5283 5283 IEM_SVM_CHECK_READ_CR0_INTERCEPT(pVCpu, 0 /* uExitInfo1 */, 0 /* uExitInfo2 */); 5284 /** @todo NSTVMX: SMSW CR0 masking. */ 5284 5285 uint64_t u64GuestCr0 = pVCpu->cpum.GstCtx.cr0; 5286 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX 5287 if (IEM_VMX_IS_NON_ROOT_MODE(pVCpu)) 5288 u64GuestCr0 = iemVmxMaskCr0CR4(pVCpu, 0 /* iCrReg */, u64GuestCr0); 5289 #endif 5285 5290 5286 5291 switch (enmEffOpSize) … … 5288 5293 case IEMMODE_16BIT: 5289 5294 if (IEM_GET_TARGET_CPU(pVCpu) > IEMTARGETCPU_386) 5290 *(uint16_t *)iemGRegRef(pVCpu, iGReg) = (uint16_t) pVCpu->cpum.GstCtx.cr0;5295 *(uint16_t *)iemGRegRef(pVCpu, iGReg) = (uint16_t)u64GuestCr0; 5291 5296 else if (IEM_GET_TARGET_CPU(pVCpu) >= IEMTARGETCPU_386) 5292 *(uint16_t *)iemGRegRef(pVCpu, iGReg) = (uint16_t) pVCpu->cpum.GstCtx.cr0 | 0xffe0;5297 *(uint16_t *)iemGRegRef(pVCpu, iGReg) = (uint16_t)u64GuestCr0 | 0xffe0; 5293 5298 else 5294 *(uint16_t *)iemGRegRef(pVCpu, iGReg) = (uint16_t) pVCpu->cpum.GstCtx.cr0 | 0xfff0;5299 *(uint16_t *)iemGRegRef(pVCpu, iGReg) = (uint16_t)u64GuestCr0 | 0xfff0; 5295 5300 break; 5296 5301 5297 5302 case IEMMODE_32BIT: 5298 *(uint64_t *)iemGRegRef(pVCpu, iGReg) = (uint32_t) pVCpu->cpum.GstCtx.cr0;5303 *(uint64_t *)iemGRegRef(pVCpu, iGReg) = (uint32_t)u64GuestCr0; 5299 5304 break; 5300 5305 5301 5306 case IEMMODE_64BIT: 5302 *(uint64_t *)iemGRegRef(pVCpu, iGReg) = pVCpu->cpum.GstCtx.cr0;5307 *(uint64_t *)iemGRegRef(pVCpu, iGReg) = u64GuestCr0; 5303 5308 break; 5304 5309
Note:
See TracChangeset
for help on using the changeset viewer.