Changeset 53609 in vbox for trunk/src/VBox
- Timestamp:
- Dec 30, 2014 6:34:49 PM (10 years ago)
- 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 1546 1546 * Reset various things. 1547 1547 */ 1548 pThis->iInOut = 0; 1548 for (uint32_t i = 0; i < RT_ELEMENTS(pThis->aiInOut); i++) 1549 pThis->aiInOut[i] = 0; 1549 1550 1550 1551 return true; -
trunk/src/VBox/ValidationKit/utils/cpu/cidet-instr-1.cpp
r53608 r53609 137 137 Assert(pThis->idxMrmRmOp < 2); 138 138 Assert(pThis->idxMrmRmOp != pThis->idxMrmRegOp); 139 AssertCompile(RT_ELEMENTS(pThis->aiInOut) >= 4); 139 140 140 141 if (!fInvalid) … … 149 150 case 1: 150 151 { 151 uint16_t idx = ++pThis-> iInOut% pResults->c8Entries;152 uint16_t idx = ++pThis->aiInOut[0] % pResults->c8Entries; 152 153 PCCIDET2IN1OUTWITHFLAGSU8ENTRY pEntry = &pResults->pa8Entries[idx]; 153 154 rc = idx ? VINF_SUCCESS : VINF_EOF; … … 165 166 case 2: 166 167 { 167 uint16_t idx = ++pThis-> iInOut% pResults->c16Entries;168 uint16_t idx = ++pThis->aiInOut[1] % pResults->c16Entries; 168 169 PCCIDET2IN1OUTWITHFLAGSU16ENTRY pEntry = &pResults->pa16Entries[idx]; 169 170 rc = idx ? VINF_SUCCESS : VINF_EOF; … … 181 182 case 4: 182 183 { 183 uint16_t idx = ++pThis-> iInOut% pResults->c32Entries;184 uint16_t idx = ++pThis->aiInOut[2] % pResults->c32Entries; 184 185 PCCIDET2IN1OUTWITHFLAGSU32ENTRY pEntry = &pResults->pa32Entries[idx]; 185 186 rc = idx ? VINF_SUCCESS : VINF_EOF; … … 199 200 case 8: 200 201 { 201 uint16_t idx = ++pThis-> iInOut% pResults->c64Entries;202 uint16_t idx = ++pThis->aiInOut[3] % pResults->c64Entries; 202 203 PCCIDET2IN1OUTWITHFLAGSU64ENTRY pEntry = &pResults->pa64Entries[idx]; 203 204 rc = idx ? VINF_SUCCESS : VINF_EOF; … … 232 233 { 233 234 { 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 }, 234 238 }; 235 239 static const CIDET2IN1OUTWITHFLAGSU16ENTRY s_a16Results[] = 236 240 { 237 241 { 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 }, 238 245 }; 239 246 static const CIDET2IN1OUTWITHFLAGSU32ENTRY s_a32Results[] = 240 247 { 241 248 { 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 }, 242 252 }; 243 253 static const CIDET2IN1OUTWITHFLAGSU64ENTRY s_a64Results[] = 244 254 { 245 255 { 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 }, 246 259 }; 247 260 static const CIDET2IN1OUTWITHFLAGS s_Results = CIDET2IN1OUTWITHFLAGS_INITIALIZER(CF | PF | AF | SF | OF); -
trunk/src/VBox/ValidationKit/utils/cpu/cidet.h
r53608 r53609 872 872 DECLCALLBACKMEMBER(void, pfnFailure)(struct CIDETCORE *pThis, const char *pszFormat, va_list va); 873 873 874 /** Variable that's incremented each time the FNCIDETSETUPINOUT is called875 * for an instruction. Reset when changing instruction or switching876 * between valid and invalidinputs. */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]; 878 878 879 879 /** @name Copyied and extracted instruction information.
Note:
See TracChangeset
for help on using the changeset viewer.