VirtualBox

Changeset 53609 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 30, 2014 6:34:49 PM (10 years ago)
Author:
vboxsync
Message:

cidet: More add test values. Need to have separate indexes for each result value set or we might skip test values.

Location:
trunk/src/VBox/ValidationKit/utils/cpu
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/cpu/cidet-core.cpp

    r53608 r53609  
    15461546     * Reset various things.
    15471547     */
    1548     pThis->iInOut = 0;
     1548    for (uint32_t i = 0; i < RT_ELEMENTS(pThis->aiInOut); i++)
     1549        pThis->aiInOut[i] = 0;
    15491550
    15501551    return true;
  • trunk/src/VBox/ValidationKit/utils/cpu/cidet-instr-1.cpp

    r53608 r53609  
    137137    Assert(pThis->idxMrmRmOp  < 2);
    138138    Assert(pThis->idxMrmRmOp != pThis->idxMrmRegOp);
     139    AssertCompile(RT_ELEMENTS(pThis->aiInOut) >= 4);
    139140
    140141    if (!fInvalid)
     
    149150                case 1:
    150151                {
    151                     uint16_t                       idx    = ++pThis->iInOut % pResults->c8Entries;
     152                    uint16_t                       idx    = ++pThis->aiInOut[0] % pResults->c8Entries;
    152153                    PCCIDET2IN1OUTWITHFLAGSU8ENTRY pEntry = &pResults->pa8Entries[idx];
    153154                    rc = idx ? VINF_SUCCESS : VINF_EOF;
     
    165166                case 2:
    166167                {
    167                     uint16_t                        idx    = ++pThis->iInOut % pResults->c16Entries;
     168                    uint16_t                        idx    = ++pThis->aiInOut[1] % pResults->c16Entries;
    168169                    PCCIDET2IN1OUTWITHFLAGSU16ENTRY pEntry = &pResults->pa16Entries[idx];
    169170                    rc = idx ? VINF_SUCCESS : VINF_EOF;
     
    181182                case 4:
    182183                {
    183                     uint16_t                        idx    = ++pThis->iInOut % pResults->c32Entries;
     184                    uint16_t                        idx    = ++pThis->aiInOut[2] % pResults->c32Entries;
    184185                    PCCIDET2IN1OUTWITHFLAGSU32ENTRY pEntry = &pResults->pa32Entries[idx];
    185186                    rc = idx ? VINF_SUCCESS : VINF_EOF;
     
    199200                case 8:
    200201                {
    201                     uint16_t                        idx    = ++pThis->iInOut % pResults->c64Entries;
     202                    uint16_t                        idx    = ++pThis->aiInOut[3] % pResults->c64Entries;
    202203                    PCCIDET2IN1OUTWITHFLAGSU64ENTRY pEntry = &pResults->pa64Entries[idx];
    203204                    rc = idx ? VINF_SUCCESS : VINF_EOF;
     
    232233    {
    233234        { UINT8_C(0x00), UINT8_C(0x00), 0, UINT8_C(0x00), ZF | PF },
     235        { UINT8_C(0xff), UINT8_C(0x01), 0, UINT8_C(0x00), CF | ZF | AF | PF  },
     236        { UINT8_C(0x7f), UINT8_C(0x80), 0, UINT8_C(0xff), SF | PF },
     237        { UINT8_C(0x01), UINT8_C(0x01), 0, UINT8_C(0x02), 0 },
    234238    };
    235239    static const CIDET2IN1OUTWITHFLAGSU16ENTRY s_a16Results[] =
    236240    {
    237241        { UINT16_C(0x0000), UINT16_C(0x0000), 0, UINT16_C(0x0000), ZF | PF },
     242        { UINT16_C(0xfefd), UINT16_C(0x0103), 0, UINT16_C(0x0000), CF | ZF | AF | PF },
     243        { UINT16_C(0x8e7d), UINT16_C(0x7182), 0, UINT16_C(0xffff), SF | PF },
     244        { UINT16_C(0x0001), UINT16_C(0x0001), 0, UINT16_C(0x0002), 0 },
    238245    };
    239246    static const CIDET2IN1OUTWITHFLAGSU32ENTRY s_a32Results[] =
    240247    {
    241248        { UINT32_C(0x00000000), UINT32_C(0x00000000), 0, UINT32_C(0x00000000), ZF | PF },
     249        { UINT32_C(0xfefdfcfb), UINT32_C(0x01020305), 0, UINT32_C(0x00000000), CF | ZF | AF | PF },
     250        { UINT32_C(0x8efdfcfb), UINT32_C(0x71020304), 0, UINT32_C(0xffffffff), SF | PF },
     251        { UINT32_C(0x00000001), UINT32_C(0x00000001), 0, UINT32_C(0x00000002), 0 },
    242252    };
    243253    static const CIDET2IN1OUTWITHFLAGSU64ENTRY s_a64Results[] =
    244254    {
    245255        { UINT64_C(0x0000000000000000), UINT64_C(0x0000000000000000), 0, UINT64_C(0x0000000000000000), ZF | PF },
     256        { UINT64_C(0xfefdfcfbfaf9f8f7), UINT64_C(0x0102030405060709), 0, UINT64_C(0x0000000000000000), CF | ZF | AF | PF },
     257        { UINT64_C(0x7efdfcfbfaf9f8f7), UINT64_C(0x8102030405060708), 0, UINT64_C(0xffffffffffffffff), SF | PF },
     258        { UINT64_C(0x0000000000000001), UINT64_C(0x0000000000000001), 0, UINT64_C(0x0000000000000002), 0 },
    246259    };
    247260    static const CIDET2IN1OUTWITHFLAGS s_Results = CIDET2IN1OUTWITHFLAGS_INITIALIZER(CF | PF | AF | SF | OF);
  • trunk/src/VBox/ValidationKit/utils/cpu/cidet.h

    r53608 r53609  
    872872    DECLCALLBACKMEMBER(void, pfnFailure)(struct CIDETCORE *pThis, const char *pszFormat, va_list va);
    873873
    874     /** Variable that's incremented each time the FNCIDETSETUPINOUT is called
    875      *  for an instruction.  Reset when changing instruction or switching
    876      *  between valid and invalid inputs. */
    877     uint32_t            iInOut;
     874    /** Array of indexes for use by FNCIDETSETUPINOUT.
     875     * Reset when changing instruction or switching between valid and invalid
     876     * inputs. */
     877    uint32_t            aiInOut[4];
    878878
    879879    /** @name Copyied and extracted instruction information.
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