Changeset 104705 in vbox for trunk/src/VBox/ValidationKit/bootsectors
- Timestamp:
- May 17, 2024 10:19:57 AM (9 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-4.c32
r104652 r104705 723 723 BS3CPUINSTR4_CONFIG_T const BS3_FAR *pConfig; 724 724 BS3CPUINSTR4_TEST1_T const BS3_FAR *pTest; 725 BS3CPUINSTR4_TEST1_VALUES_PD_T const BS3_FAR *pValues;725 unsigned iVal; 726 726 const char BS3_FAR *pszMode; 727 727 PBS3TRAPFRAME pTrapFrame; … … 748 748 PCBS3CPUINSTRX_CONFIG_SAVED_T pSavedCfg) 749 749 { 750 BS3CPUINSTR4_TEST1_T const BS3_FAR *pTest = pTestCtx->pTest;751 BS3CPUINSTR4_TEST1_VALUES_PD_T const BS3_FAR *pValues = pTestCtx->pValues;750 BS3CPUINSTR4_TEST1_T const BS3_FAR *pTest = pTestCtx->pTest; 751 BS3CPUINSTR4_TEST1_VALUES_PD_T const BS3_FAR *pValues = &pTestCtx->pTest->paValues[pTestCtx->iVal]; 752 752 PBS3TRAPFRAME pTrapFrame = pTestCtx->pTrapFrame; 753 753 PBS3REGCTX pCtx = pTestCtx->pCtx; … … 818 818 819 819 /* Setup MXCSR for the current test. */ 820 { 821 uMxCsr = (pSavedCfg->uMxCsr & ~(X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_MASK)) 822 | (pValues->fMxCsrMask & X86_MXCSR_XCPT_MASK) 823 | (pValues->fRoundingCtlMask & X86_MXCSR_RC_MASK); 824 if ( pValues->fDenormalsAreZero 825 && g_fMxCsrDazSupported) 826 uMxCsr |= X86_MXCSR_DAZ; 827 if (pValues->fFlushToZero) 828 uMxCsr |= X86_MXCSR_FZ; 829 Bs3ExtCtxSetMxCsr(pExtCtx, uMxCsr); 830 } 820 uMxCsr = (pSavedCfg->uMxCsr & ~(X86_MXCSR_XCPT_MASK | X86_MXCSR_RC_MASK)) 821 | (pValues->fMxCsrMask & X86_MXCSR_XCPT_MASK) 822 | (pValues->fRoundingCtlMask & X86_MXCSR_RC_MASK); 823 if ( pValues->fDenormalsAreZero 824 && g_fMxCsrDazSupported) 825 uMxCsr |= X86_MXCSR_DAZ; 826 if (pValues->fFlushToZero) 827 uMxCsr |= X86_MXCSR_FZ; 828 Bs3ExtCtxSetMxCsr(pExtCtx, uMxCsr); 831 829 832 830 /* … … 864 862 if (bXcptExpect == X86_XCPT_DB) 865 863 { 866 PBS3TRAPFRAME volatile pTrapFrameXcpt = pTrapFrame;867 864 uint32_t const fMxCsrXcptFlags = Bs3ExtCtxGetMxCsr(pExtCtxOut) & X86_MXCSR_XCPT_FLAGS; 868 865 … … 880 877 if (fFpFlagsExpect) 881 878 { 882 if (pTrapFrame Xcpt->bXcpt == bFpXcpt)879 if (pTrapFrame->bXcpt == bFpXcpt) 883 880 { /* likely */ } 884 881 else 885 882 Bs3TestFailedF("Expected floating-point xcpt %s, got %s", bs3CpuInstr4XcptName(bFpXcpt), 886 bs3CpuInstr4XcptName(pTrapFrame Xcpt->bXcpt));883 bs3CpuInstr4XcptName(pTrapFrame->bXcpt)); 887 884 } 888 else if (pTrapFrame Xcpt->bXcpt == X86_XCPT_DB)885 else if (pTrapFrame->bXcpt == X86_XCPT_DB) 889 886 { /* likely */ } 890 887 else 891 Bs3TestFailedF("Expected no xcpt, got %s", bs3CpuInstr4XcptName(pTrapFrame Xcpt->bXcpt));888 Bs3TestFailedF("Expected no xcpt, got %s", bs3CpuInstr4XcptName(pTrapFrame->bXcpt)); 892 889 } 893 890 /* Check if non-FP exception is as expected. */ … … 904 901 if (bXcptExpect == X86_XCPT_PF) 905 902 pCtx->cr2.u = (uintptr_t)puMemOp; 906 Bs3TestCheckRegCtxEx(&pTrapFrame->Ctx, pCtx, bXcptExpect == X86_XCPT_DB && !fFpFlagsExpect ? cbInstr + 1 : 0, 0 ,903 Bs3TestCheckRegCtxEx(&pTrapFrame->Ctx, pCtx, bXcptExpect == X86_XCPT_DB && !fFpFlagsExpect ? cbInstr + 1 : 0, 0 /*cbSpAdjust*/, 907 904 (bXcptExpect == X86_XCPT_DB && !fFpFlagsExpect) || BS3_MODE_IS_16BIT_SYS(bMode) ? 0 : X86_EFL_RF, 908 905 pTestCtx->pszMode, pTestCtx->idTestStep); … … 1023 1020 uint16_t cErrors; 1024 1021 BS3CPUINSTR4_TEST1_CTX_T TestCtx; 1025 BS3CPUINSTR4_TEST1_VALUES_PD_T const BS3_FAR *pValues = &pTest->paValues[iVal];1026 1022 1027 1023 if (BS3_SKIPIT(bRing, iCfg, iTest, iVal, 0)) … … 1035 1031 TestCtx.pConfig = &paConfigs[iCfg]; 1036 1032 TestCtx.pTest = pTest; 1037 TestCtx. pValues = pValues;1033 TestCtx.iVal = iVal; 1038 1034 TestCtx.pszMode = pszMode; 1039 1035 TestCtx.pTrapFrame = &TrapFrame;
Note:
See TracChangeset
for help on using the changeset viewer.