Changeset 102096 in vbox
- Timestamp:
- Nov 15, 2023 11:11:59 AM (16 months ago)
- svn:sync-xref-src-repo-rev:
- 160217
- Location:
- trunk/src/VBox/ValidationKit/bootsectors
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/VBox/ValidationKit/bootsectors/Config.kmk ¶
r99040 r102096 341 341 # Visual C++ tool variant that runs the object converter afterwards. 342 342 # 343 # We also run SED on the assembly listing looking for SSE instructions, since 344 # the compiler doesn't have any known option to suppress SSE optimization. When 345 # the SED script finds something, the source code needs to be tweaked to work 346 # around it. See r160217 for examples. 347 # 343 348 TOOL_Bs3Vcc64 := Visual C++ 64-bit 344 349 TOOL_Bs3Vcc64_CC = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CC) … … 356 361 TOOL_Bs3Vcc64_COMPILE_C_OUTPUT = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_OUTPUT) 357 362 TOOL_Bs3Vcc64_COMPILE_C_OUTPUT_MAYBE = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_OUTPUT_MAYBE) $(obj).original 363 TOOL_Bs3Vcc64_COMPILE_C_OUTPUT_MAYBE_PRECIOUS = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_OUTPUT_MAYBE_PRECIOUS) $(outbase)-obj.asm 358 364 define TOOL_Bs3Vcc64_COMPILE_C_CMDS 359 $( TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_CMDS)365 $(subst -Fo,-Fa$(outbase)-obj.asm -Fo,$(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_CMDS)) 360 366 $(QUIET)$(VBOX_BS3KIT_KSUBMIT_OBJ_CONV) $(VBoxBs3ObjConverter_1_TARGET) "$(obj)" 367 $(QUIET)$(SED) -e '/xmm[0-9]/!d' -e 'q11' $(outbase)-obj.asm 361 368 endef 362 369 … … 389 396 TOOL_Bs3Vcc64_COMPILE_CXX_OUTPUT = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_OUTPUT) 390 397 TOOL_Bs3Vcc64_COMPILE_CXX_OUTPUT_MAYBE = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_OUTPUT_MAYBE) $(obj).original 398 TOOL_Bs3Vcc64_COMPILE_CXX_OUTPUT_MAYBE_PRECIOUS = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_OUTPUT_MAYBE_PRECIOUS) $(outbase)-obj.asm 391 399 define TOOL_Bs3Vcc64_COMPILE_CXX_CMDS 392 $( TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_CMDS)400 $(subst -Fo,-Fa$(outbase)-obj.asm -Fo,$(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_CMDS)) 393 401 $(QUIET)$(VBOX_BS3KIT_KSUBMIT_OBJ_CONV) $(VBoxBs3ObjConverter_1_TARGET) "$(obj)" 402 $(QUIET)$(SED) -e '/xmm[0-9]/!d' -e 'q11' $(outbase)-obj.asm 394 403 endef 395 404 -
TabularUnified trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-basic-2-template.c ¶
r98103 r102096 936 936 for (; i <= k; i++, g_usBs3TestStep++) 937 937 { 938 Idtr = IdtrSaved;939 Idtr.cbIdt 938 Idtr.pIdt = IdtrSaved.pIdt; 939 Idtr.cbIdt = i; 940 940 ASMSetIDTR(&Idtr); 941 941 Bs3TrapSetJmpAndRestore(&Ctx81, &TrapCtx); -
TabularUnified trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-ExtCtxGetXmm.c ¶
r98103 r102096 45 45 BS3_CMN_DEF(PRTUINT128U, Bs3ExtCtxGetXmm,(PCBS3EXTCTX pExtCtx, uint8_t iReg, PRTUINT128U pValue)) 46 46 { 47 #ifdef _MSC_VER /* No-SSE hack */ 48 RTUINT128U volatile RT_FAR *pValueNoSseHack = (RTUINT128U volatile RT_FAR *)pValue; 49 # define pValue pValueNoSseHack 50 #endif 47 51 AssertCompileMembersAtSameOffset(BS3EXTCTX, Ctx.x87.aXMM, BS3EXTCTX, Ctx.x.x87.aXMM); 48 52 switch (pExtCtx->enmMethod) … … 52 56 if (iReg < RT_ELEMENTS(pExtCtx->Ctx.x87.aXMM)) 53 57 { 54 pValue->u = pExtCtx->Ctx.x87.aXMM[iReg].xmm; 58 pValue->au64[0] = pExtCtx->Ctx.x87.aXMM[iReg].au64[0]; 59 pValue->au64[1] = pExtCtx->Ctx.x87.aXMM[iReg].au64[1]; 55 60 return pValue; 56 61 } … … 60 65 pValue->au64[0] = 0; 61 66 pValue->au64[1] = 0; 62 return pValue;67 return (PRTUINT128U)pValue; 63 68 } 64 69 -
TabularUnified trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-ExtCtxGetYmm.c ¶
r98103 r102096 45 45 BS3_CMN_DEF(PRTUINT256U, Bs3ExtCtxGetYmm,(PCBS3EXTCTX pExtCtx, uint8_t iReg, PRTUINT256U pValue)) 46 46 { 47 pValue->au128[0].au64[0] = 0; 48 pValue->au128[0].au64[1] = 0; 49 pValue->au128[1].au64[0] = 0; 50 pValue->au128[1].au64[1] = 0; 47 #ifdef _MSC_VER /* No-SSE hack */ 48 RTUINT256U volatile RT_FAR *pValueNoSseHack = (RTUINT256U volatile RT_FAR *)pValue; /* No-SSE hack */ 49 # define pValue pValueNoSseHack 50 #endif 51 pValue->au64[0] = 0; 52 pValue->au64[1] = 0; 53 pValue->au64[2] = 0; 54 pValue->au64[3] = 0; 51 55 52 56 switch (pExtCtx->enmMethod) … … 54 58 case BS3EXTCTXMETHOD_FXSAVE: 55 59 if (iReg < RT_ELEMENTS(pExtCtx->Ctx.x87.aXMM)) 56 pValue->au128[0] = pExtCtx->Ctx.x87.aXMM[iReg].uXmm; 60 { 61 pValue->au64[0] = pExtCtx->Ctx.x87.aXMM[iReg].uXmm.au64[0]; 62 pValue->au64[1] = pExtCtx->Ctx.x87.aXMM[iReg].uXmm.au64[1]; 63 } 57 64 break; 58 65 … … 60 67 if (iReg < RT_ELEMENTS(pExtCtx->Ctx.x.x87.aXMM)) 61 68 { 62 pValue->au128[0] = pExtCtx->Ctx.x87.aXMM[iReg].uXmm; 69 pValue->au64[0] = pExtCtx->Ctx.x87.aXMM[iReg].uXmm.au64[0]; 70 pValue->au64[1] = pExtCtx->Ctx.x87.aXMM[iReg].uXmm.au64[1]; 63 71 if (pExtCtx->fXcr0Nominal & XSAVE_C_YMM) 64 pValue->au128[1] = pExtCtx->Ctx.x.u.YmmHi.aYmmHi[iReg].uXmm; 72 { 73 pValue->au64[2] = pExtCtx->Ctx.x.u.YmmHi.aYmmHi[iReg].uXmm.au64[0]; 74 pValue->au64[3] = pExtCtx->Ctx.x.u.YmmHi.aYmmHi[iReg].uXmm.au64[1]; 75 } 65 76 } 66 77 break; 67 78 } 68 return pValue;79 return (PRTUINT256U)pValue; 69 80 } 70 81 -
TabularUnified trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-ExtCtxSetXmm.c ¶
r98103 r102096 52 52 if (iReg < RT_ELEMENTS(pExtCtx->Ctx.x87.aXMM)) 53 53 { 54 pExtCtx->Ctx.x87.aXMM[iReg].xmm = pValue->u; 54 pExtCtx->Ctx.x87.aXMM[iReg].au64[0] = pValue->au64[0]; 55 pExtCtx->Ctx.x87.aXMM[iReg].au64[1] = pValue->au64[1]; 55 56 return true; 56 57 } -
TabularUnified trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-ExtCtxSetYmm.c ¶
r98103 r102096 45 45 BS3_CMN_DEF(bool, Bs3ExtCtxSetYmm,(PBS3EXTCTX pExtCtx, uint8_t iReg, PCRTUINT256U pValue, uint8_t cbValue)) 46 46 { 47 #ifdef _MSC_VER /* No-SSE hack */ 48 BS3EXTCTX volatile RT_FAR *pExtCtxNoSseHack = (BS3EXTCTX volatile RT_FAR *)pExtCtx; 49 # define pExtCtx pExtCtxNoSseHack 50 #endif 47 51 BS3_ASSERT(cbValue == 16 || cbValue == 32); 48 52 switch (pExtCtx->enmMethod) … … 51 55 if (iReg < RT_ELEMENTS(pExtCtx->Ctx.x87.aXMM)) 52 56 { 53 pExtCtx->Ctx.x87.aXMM[iReg].uXmm = pValue->DQWords.dqw0; 57 pExtCtx->Ctx.x87.aXMM[iReg].au64[0] = pValue->DQWords.dqw0.au64[0]; 58 pExtCtx->Ctx.x87.aXMM[iReg].au64[1] = pValue->DQWords.dqw0.au64[1]; 54 59 return true; 55 60 } … … 59 64 if (iReg < RT_ELEMENTS(pExtCtx->Ctx.x.x87.aXMM)) 60 65 { 61 pExtCtx->Ctx.x87.aXMM[iReg].uXmm = pValue->DQWords.dqw0; 66 pExtCtx->Ctx.x87.aXMM[iReg].au64[0] = pValue->DQWords.dqw0.au64[0]; 67 pExtCtx->Ctx.x87.aXMM[iReg].au64[1] = pValue->DQWords.dqw0.au64[1]; 62 68 if (pExtCtx->fXcr0Nominal & XSAVE_C_YMM) 63 69 { 64 70 if (cbValue >= 32) 65 pExtCtx->Ctx.x.u.YmmHi.aYmmHi[iReg].uXmm = pValue->DQWords.dqw1; 71 { 72 pExtCtx->Ctx.x.u.YmmHi.aYmmHi[iReg].au64[0] = pValue->DQWords.dqw1.au64[0]; 73 pExtCtx->Ctx.x.u.YmmHi.aYmmHi[iReg].au64[1] = pValue->DQWords.dqw1.au64[1]; 74 } 66 75 else 67 76 { -
TabularUnified trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingQueryAddressInfo.c ¶
r98103 r102096 47 47 BS3_CMN_DEF(int, Bs3PagingQueryAddressInfo,(uint64_t uFlat, PBS3PAGINGINFO4ADDR pPgInfo)) 48 48 { 49 #ifdef _MSC_VER 50 BS3PAGINGINFO4ADDR volatile BS3_FAR *pPgInfoNoSseHack = (BS3PAGINGINFO4ADDR volatile BS3_FAR *)pPgInfo; 51 # define pPgInfo pPgInfoNoSseHack 52 #endif 49 53 RTCCUINTXREG const cr3 = ASMGetCR3(); 50 54 RTCCUINTXREG const cr4 = g_uBs3CpuDetected & BS3CPU_F_CPUID ? ASMGetCR4() : 0; -
TabularUnified trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap64Init.c ¶
r98103 r102096 76 76 /* [X86_XCPT_CP] = */ 6, 77 77 }; 78 #ifdef _MSC_VER /* No-SSE hack */ 79 X86TSS64 BS3_FAR volatile *pTss; 80 #else 78 81 X86TSS64 BS3_FAR *pTss; 82 #endif 79 83 unsigned iIdt; 80 84
Note:
See TracChangeset
for help on using the changeset viewer.