VirtualBox

Ignore:
Timestamp:
May 17, 2024 10:19:57 AM (9 months ago)
Author:
vboxsync
Message:

ValidationKit/bootsectors: bugref:10658 SIMD FP testcase: nits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-4.c32

    r104652 r104705  
    723723    BS3CPUINSTR4_CONFIG_T const BS3_FAR          *pConfig;
    724724    BS3CPUINSTR4_TEST1_T const BS3_FAR           *pTest;
    725     BS3CPUINSTR4_TEST1_VALUES_PD_T const BS3_FAR *pValues;
     725    unsigned                                      iVal;
    726726    const char BS3_FAR                           *pszMode;
    727727    PBS3TRAPFRAME                                 pTrapFrame;
     
    748748                                                   PCBS3CPUINSTRX_CONFIG_SAVED_T pSavedCfg)
    749749{
    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];
    752752    PBS3TRAPFRAME    pTrapFrame     = pTestCtx->pTrapFrame;
    753753    PBS3REGCTX       pCtx           = pTestCtx->pCtx;
     
    818818
    819819    /* 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);
    831829
    832830    /*
     
    864862    if (bXcptExpect == X86_XCPT_DB)
    865863    {
    866         PBS3TRAPFRAME volatile pTrapFrameXcpt = pTrapFrame;
    867864        uint32_t const fMxCsrXcptFlags = Bs3ExtCtxGetMxCsr(pExtCtxOut) & X86_MXCSR_XCPT_FLAGS;
    868865
     
    880877        if (fFpFlagsExpect)
    881878        {
    882             if (pTrapFrameXcpt->bXcpt == bFpXcpt)
     879            if (pTrapFrame->bXcpt == bFpXcpt)
    883880            { /* likely */ }
    884881            else
    885882                Bs3TestFailedF("Expected floating-point xcpt %s, got %s", bs3CpuInstr4XcptName(bFpXcpt),
    886                                bs3CpuInstr4XcptName(pTrapFrameXcpt->bXcpt));
     883                               bs3CpuInstr4XcptName(pTrapFrame->bXcpt));
    887884        }
    888         else if (pTrapFrameXcpt->bXcpt == X86_XCPT_DB)
     885        else if (pTrapFrame->bXcpt == X86_XCPT_DB)
    889886        { /* likely */ }
    890887        else
    891             Bs3TestFailedF("Expected no xcpt, got %s", bs3CpuInstr4XcptName(pTrapFrameXcpt->bXcpt));
     888            Bs3TestFailedF("Expected no xcpt, got %s", bs3CpuInstr4XcptName(pTrapFrame->bXcpt));
    892889    }
    893890    /* Check if non-FP exception is as expected. */
     
    904901    if (bXcptExpect == X86_XCPT_PF)
    905902        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*/,
    907904                         (bXcptExpect == X86_XCPT_DB && !fFpFlagsExpect) || BS3_MODE_IS_16BIT_SYS(bMode) ? 0 : X86_EFL_RF,
    908905                         pTestCtx->pszMode, pTestCtx->idTestStep);
     
    10231020                            uint16_t cErrors;
    10241021                            BS3CPUINSTR4_TEST1_CTX_T TestCtx;
    1025                             BS3CPUINSTR4_TEST1_VALUES_PD_T const BS3_FAR *pValues = &pTest->paValues[iVal];
    10261022
    10271023                            if (BS3_SKIPIT(bRing, iCfg, iTest, iVal, 0))
     
    10351031                            TestCtx.pConfig             = &paConfigs[iCfg];
    10361032                            TestCtx.pTest               = pTest;
    1037                             TestCtx.pValues             = pValues;
     1033                            TestCtx.iVal                = iVal;
    10381034                            TestCtx.pszMode             = pszMode;
    10391035                            TestCtx.pTrapFrame          = &TrapFrame;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette