VirtualBox

Changeset 104015 in vbox for trunk


Ignore:
Timestamp:
Mar 23, 2024 2:04:08 AM (12 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
162403
Message:

ValKit/bs3-cpu-instr-2: update docs on odd rol/ror behaviour. bugref:10376

Location:
trunk/src/VBox/ValidationKit/bootsectors
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2-gen.cpp

    r104006 r104015  
    568568                                             uSrc1, uSrc2, uResult, fEflOut); \
    569569                            else \
    570                             {   /* Seems that 'rol reg,Ib' (and possibly others) produces different OF results on intel. */ \
     570                            { \
     571                                /* Seems that 'rol reg,Ib' & 'ror reg,Ib' produces different OF results on intel. \
     572                                   Observed on 8700B, 9980HK, 10980xe, 1260p, ++. */ \
    571573                                a_ValueType    uResultIb = 0; \
    572574                                uint32_t const fEflOutIb = a_Entry.a_pfnMemberIb(uSrc1, uSrc2, fEflIn, &uResultIb) \
     
    590592                                                 uResult, (uint16_t)(fEflOut | RT_BIT_32(BS3CPUINSTR2BIN_EFL_CARRY_IN_BIT))); \
    591593                                else \
    592                                 {   /* Seems that 'rol reg,Ib' (and possibly others) produces different OF results on intel. */ \
     594                                { \
     595                                    /* Seems that 'rol reg,Ib' & 'ror reg,Ib' produces different OF results on intel. \
     596                                       Observed on 8700B, 9980HK, 10980xe, 1260p, ++. */ \
    593597                                    a_ValueType    uResultIb = 0; \
    594598                                    uint32_t const fEflOutIb = a_Entry.a_pfnMemberIb(uSrc1, uSrc2, fEflIn | X86_EFL_CF, &uResultIb) \
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2-template.c

    r104008 r104015  
    10211021                CtxExpect.rflags.u16 &= ~X86_EFL_STATUS_BITS; \
    10221022                CtxExpect.rflags.u16 |= paTestData[iTestData].fEflOut & X86_EFL_STATUS_BITS; \
     1023                /* Intel: 'ROL reg,imm8' and 'ROR reg,imm8' produces different OF values. \
     1024                          stored in bit 3 of the output.  Observed on 8700B, 9980HK, 10980xe, \
     1025                          1260p, ++. */ \
    10231026                if (fIntelIbProblem && cBitsImm == 8 && !paTests[iTest].fDstMem) \
    1024                 {   /* Intel 10890xe: 'ROL reg,imm8' and 'ROR reg,imm8' produces different OF values. \
    1025                                       stored in bit 3 of the output. */ \
     1027                { \
    10261028                    CtxExpect.rflags.u16 &= ~X86_EFL_OF; \
    10271029                    CtxExpect.rflags.u16 |= (paTestData[iTestData].fEflOut & RT_BIT_32(BS3CPUINSTR2SHIFT_EFL_IB_OVERFLOW_OUT_BIT)) \
     
    10401042                    if (fUndefEfl) /* When executing tests for the other CPU vendor. */ \
    10411043                        CtxExpect.rflags.u16 = (CtxExpect.rflags.u16 & ~fUndefEfl) | (TrapFrame.Ctx.rflags.u16 & fUndefEfl); \
    1042                     /* Alternative overflow flag workaround: else if (fIntelIbProblem && cBitsImm == 8 && !paTests[iTest].fDstMem) \
    1043                     { \
    1044                         Bs3TestPrintf("tweaked in=%#x out=%#x exp=%#x\n", Ctx.rflags.u16, TrapFrame.Ctx.rflags.u16, CtxExpect.rflags.u16); \
    1045                         CtxExpect.rflags.u16 = (CtxExpect.rflags.u16 & ~X86_EFL_OF) | (TrapFrame.Ctx.rflags.u16 & X86_EFL_OF); \
    1046                     } else if (cBitsImm == 8) Bs3TestPrintf("as is\n"); */\
    10471044                    \
    10481045                    if (TrapFrame.bXcpt != X86_XCPT_UD) \
Note: See TracChangeset for help on using the changeset viewer.

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