VirtualBox

Ignore:
Timestamp:
Apr 10, 2024 9:42:20 AM (10 months ago)
Author:
vboxsync
Message:

VMM/IEM: Rework pcmpistri emulation to pass the new ECX value as return argument freeing up one argument which can be used to pass both source operands by reference getting rid of IEMPCMPISTRXSRC for this. This enables recompilation of pcmpistri which is used by Linux a fair bit, bugref:10641

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/testcase/tstIEMAImpl.cpp

    r104238 r104269  
    94829482            TestData.InVal2.uXmm = iTest < cTests ? RandU128() : s_aSpecials[iTest - cTests].uSrc2;
    94839483
    9484             IEMPCMPISTRXSRC TestVal;
    9485             TestVal.uSrc1 = TestData.InVal1.uXmm;
    9486             TestVal.uSrc2 = TestData.InVal2.uXmm;
    9487 
    94889484            uint32_t const fEFlagsIn = RandEFlags();
    94899485            for (uint16_t u16Imm = 0; u16Imm < 256; u16Imm++)
    94909486            {
    94919487                uint32_t fEFlagsOut = fEFlagsIn;
    9492                 pfn(&TestData.u32EcxOut, &fEFlagsOut, &TestVal, (uint8_t)u16Imm);
     9488                TestData.u32EcxOut  = pfn(&fEFlagsOut, &TestData.InVal1.uXmm,  &TestData.InVal2.uXmm, (uint8_t)u16Imm);
    94939489                TestData.fEFlagsIn  = fEFlagsIn;
    94949490                TestData.fEFlagsOut = fEFlagsOut;
     
    94989494
    94999495            /* Repeat the test with the input value being the same. */
    9500             TestData.InVal2.uXmm = TestData.InVal1.uXmm;
    9501             TestVal.uSrc1 = TestData.InVal1.uXmm;
    9502             TestVal.uSrc2 = TestData.InVal2.uXmm;
    9503 
    95049496            for (uint16_t u16Imm = 0; u16Imm < 256; u16Imm++)
    95059497            {
    95069498                uint32_t fEFlagsOut = fEFlagsIn;
    9507                 pfn(&TestData.u32EcxOut, &fEFlagsOut, &TestVal, (uint8_t)u16Imm);
     9499                TestData.u32EcxOut  = pfn(&fEFlagsOut, &TestData.InVal1.uXmm,  &TestData.InVal2.uXmm, (uint8_t)u16Imm);
    95089500                TestData.fEFlagsIn  = fEFlagsIn;
    95099501                TestData.fEFlagsOut = fEFlagsOut;
     
    95389530            for (uint32_t iTest = 0; iTest < cTests; iTest++)
    95399531            {
    9540                 IEMPCMPISTRXSRC TestVal;
    9541                 TestVal.uSrc1 = paTests[iTest].InVal1.uXmm;
    9542                 TestVal.uSrc2 = paTests[iTest].InVal2.uXmm;
    9543 
    95449532                uint32_t fEFlags = paTests[iTest].fEFlagsIn;
    9545                 uint32_t u32EcxOut = 0;
    9546                 pfn(&u32EcxOut, &fEFlags, &TestVal, paTests[iTest].bImm);
     9533                uint32_t u32EcxOut = pfn(&fEFlags, &paTests[iTest].InVal1.uXmm, &paTests[iTest].InVal2.uXmm, paTests[iTest].bImm);
    95479534                if (   fEFlags != paTests[iTest].fEFlagsOut
    95489535                    || u32EcxOut != paTests[iTest].u32EcxOut)
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