Changeset 73097 in vbox for trunk/src/VBox/VMM/VMMR3/CPUM.cpp
- Timestamp:
- Jul 12, 2018 9:06:33 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CPUM.cpp
r72643 r73097 932 932 933 933 /* Calculate the offset from CPUM to CPUMCPU for the first CPU. */ 934 pVM->cpum.s.offCPUMCPU0 = RT_ OFFSETOF(VM, aCpus[0].cpum) - RT_OFFSETOF(VM, cpum);934 pVM->cpum.s.offCPUMCPU0 = RT_UOFFSETOF(VM, aCpus[0].cpum) - RT_UOFFSETOF(VM, cpum); 935 935 Assert((uintptr_t)&pVM->cpum + pVM->cpum.s.offCPUMCPU0 == (uintptr_t)&pVM->aCpus[0].cpum); 936 936 … … 941 941 PVMCPU pVCpu = &pVM->aCpus[i]; 942 942 943 pVCpu->cpum.s.offCPUM = RT_ OFFSETOF(VM, aCpus[i].cpum) - RT_OFFSETOF(VM, cpum);943 pVCpu->cpum.s.offCPUM = RT_UOFFSETOF_DYN(VM, aCpus[i].cpum) - RT_UOFFSETOF(VM, cpum); 944 944 Assert((uintptr_t)&pVCpu->cpum - pVCpu->cpum.s.offCPUM == (uintptr_t)&pVM->cpum); 945 945 } … … 1190 1190 AssertCompile(RTASSERT_OFFSET_OF(CPUMCTX, pXStateR0) < RTASSERT_OFFSET_OF(CPUMCTX, pXStateR3)); 1191 1191 AssertCompile(RTASSERT_OFFSET_OF(CPUMCTX, pXStateR0) < RTASSERT_OFFSET_OF(CPUMCTX, pXStateRC)); 1192 memset(pCtx, 0, RT_ OFFSETOF(CPUMCTX, pXStateR0));1192 memset(pCtx, 0, RT_UOFFSETOF(CPUMCTX, pXStateR0)); 1193 1193 1194 1194 pVCpu->cpum.s.fUseFlags = fUseFlags; … … 1264 1264 1265 1265 pCtx->aXcr[0] = XSAVE_C_X87; 1266 if (pVM->cpum.s.HostFeatures.cbMaxExtendedState >= RT_ OFFSETOF(X86XSAVEAREA, Hdr))1266 if (pVM->cpum.s.HostFeatures.cbMaxExtendedState >= RT_UOFFSETOF(X86XSAVEAREA, Hdr)) 1267 1267 { 1268 1268 /* The entire FXSAVE state needs loading when we switch to XSAVE/XRSTOR … … 2181 2181 if (pFpuCtx->au32RsrvdRest[i]) 2182 2182 pHlp->pfnPrintf(pHlp, "%sRsrvdRest[%u]=%RX32 (offset=%#x)\n", 2183 pszPrefix, i, pFpuCtx->au32RsrvdRest[i], RT_ OFFSETOF(X86FXSTATE, au32RsrvdRest[i]) );2183 pszPrefix, i, pFpuCtx->au32RsrvdRest[i], RT_UOFFSETOF_DYN(X86FXSTATE, au32RsrvdRest[i]) ); 2184 2184 } 2185 2185
Note:
See TracChangeset
for help on using the changeset viewer.