209
209
RTTestIPrintf(RTTESTLVL_ALWAYS, "%08x %08x %08x %08x %08x%s\n",
210
210
iStd, s.uEAX, s.uEBX, s.uECX, s.uEDX, iStd <= cFunctions ? "" : "*");
212
if (iStd == 0x04 || iStd == 0x0b || iStd == 0x0d || iStd > cFunctions)
213
continue; /* Leaf 04 and leaf 0d output depend on the initial value of ECX
214
* The same seems to apply to invalid standard functions */
216
u32 = ASMCpuId_EAX(iStd);
217
CHECKVAL(u32, s.uEAX, "%x");
218
u32 = ASMCpuId_EBX(iStd);
219
CHECKVAL(u32, s.uEBX, "%x");
220
u32 = ASMCpuId_ECX(iStd);
221
CHECKVAL(u32, s.uECX, "%x");
222
u32 = ASMCpuId_EDX(iStd);
223
CHECKVAL(u32, s.uEDX, "%x");
227
ASMCpuId_ECX_EDX(iStd, &uECX2, &uEDX2);
228
CHECKVAL(uECX2, s.uECX, "%x");
229
CHECKVAL(uEDX2, s.uEDX, "%x");
212
/* Leaf 04 and leaf 0d output depend on the initial value of ECX
213
* The same seems to apply to invalid standard functions */
214
if (iStd > cFunctions)
216
if (iStd != 0x04 && iStd != 0x0b && iStd != 0x0d)
218
u32 = ASMCpuId_EAX(iStd);
219
CHECKVAL(u32, s.uEAX, "%x");
220
u32 = ASMCpuId_EBX(iStd);
221
CHECKVAL(u32, s.uEBX, "%x");
222
u32 = ASMCpuId_ECX(iStd);
223
CHECKVAL(u32, s.uECX, "%x");
224
u32 = ASMCpuId_EDX(iStd);
225
CHECKVAL(u32, s.uEDX, "%x");
229
ASMCpuId_ECX_EDX(iStd, &uECX2, &uEDX2);
230
CHECKVAL(uECX2, s.uECX, "%x");
231
CHECKVAL(uEDX2, s.uEDX, "%x");
235
for (uint32_t uECX = 1; s.uEAX & 0x1f; uECX++)
237
ASMCpuId_Idx_ECX(iStd, uECX, &s.uEAX, &s.uEBX, &s.uECX, &s.uEDX);
238
RTTestIPrintf(RTTESTLVL_ALWAYS, " [%02x] %08x %08x %08x %08x\n", uECX, s.uEAX, s.uEBX, s.uECX, s.uEDX);
239
RTTESTI_CHECK_BREAK(uECX < 128);
241
else if (iStd == 0x0b)
242
for (uint32_t uECX = 1; (s.uEAX & 0x1f) && (s.uEBX & 0xffff); uECX++)
244
ASMCpuId_Idx_ECX(iStd, uECX, &s.uEAX, &s.uEBX, &s.uECX, &s.uEDX);
245
RTTestIPrintf(RTTESTLVL_ALWAYS, " [%02x] %08x %08x %08x %08x\n", uECX, s.uEAX, s.uEBX, s.uECX, s.uEDX);
246
RTTESTI_CHECK_BREAK(uECX < 128);
248
else if (iStd == 0x0d)
249
for (uint32_t uECX = 1; s.uEAX != 0 || s.uEBX != 0 || s.uECX != 0 || s.uEDX != 0; uECX++)
251
ASMCpuId_Idx_ECX(iStd, uECX, &s.uEAX, &s.uEBX, &s.uECX, &s.uEDX);
252
RTTestIPrintf(RTTESTLVL_ALWAYS, " [%02x] %08x %08x %08x %08x\n", uECX, s.uEAX, s.uEBX, s.uECX, s.uEDX);
253
RTTESTI_CHECK_BREAK(uECX < 128);