Changeset 71675 in vbox
- Timestamp:
- Apr 5, 2018 11:54:17 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstRTInlineAsm.cpp
r71674 r71675 227 227 if (iStd > cFunctions) 228 228 continue; 229 if ( iStd != 0x04 /* Deterministic Cache Parameters Leaf */ 230 && iStd != 0x07 /* Structured Extended Feature Flags */ 231 && iStd != 0x0b /* Extended Topology Enumeration Leafs */ 232 && iStd != 0x0d /* Extended State Enumeration Leafs */ 233 && iStd != 0x0f /* Platform qualifity of service monitoring (PQM) */ 234 && iStd != 0x10 /* Platform qualifity of service enforcement (PQE) */ 235 && iStd != 0x14 /* Trace Enumeration Leafs */) 236 { 237 u32 = ASMCpuId_EAX(iStd); 238 CHECKVAL(u32, s.uEAX, "%x"); 239 240 uint32_t u32EbxMask = UINT32_MAX; 241 if (iStd == 1) 242 u32EbxMask = UINT32_C(0x00ffffff); /* Omit the local apic ID in case we're rescheduled. */ 243 u32 = ASMCpuId_EBX(iStd); 244 CHECKVAL(u32 & u32EbxMask, s.uEBX & u32EbxMask, "%x"); 245 246 u32 = ASMCpuId_ECX(iStd); 247 CHECKVAL(u32, s.uECX, "%x"); 248 u32 = ASMCpuId_EDX(iStd); 249 CHECKVAL(u32, s.uEDX, "%x"); 250 251 uECX2 = s.uECX - 1; 252 uEDX2 = s.uEDX - 1; 253 ASMCpuId_ECX_EDX(iStd, &uECX2, &uEDX2); 254 CHECKVAL(uECX2, s.uECX, "%x"); 255 CHECKVAL(uEDX2, s.uEDX, "%x"); 256 } 257 258 if (iStd == 0x04) 229 if (iStd == 0x04) /* Deterministic Cache Parameters Leaf */ 259 230 for (uint32_t uECX = 1; s.uEAX & 0x1f; uECX++) 260 231 { … … 263 234 RTTESTI_CHECK_BREAK(uECX < 128); 264 235 } 265 else if (iStd == 0x07) 236 else if (iStd == 0x07) /* Structured Extended Feature Flags */ 266 237 { 267 238 uint32_t uMax = s.uEAX; … … 273 244 } 274 245 } 275 else if (iStd == 0x0b) 246 else if (iStd == 0x0b) /* Extended Topology Enumeration Leafs */ 276 247 for (uint32_t uECX = 1; (s.uEAX & 0x1f) && (s.uEBX & 0xffff); uECX++) 277 248 { … … 280 251 RTTESTI_CHECK_BREAK(uECX < 128); 281 252 } 282 else if (iStd == 0x0d) 253 else if (iStd == 0x0d) /* Extended State Enumeration Leafs */ 283 254 for (uint32_t uECX = 1; s.uEAX != 0 || s.uEBX != 0 || s.uECX != 0 || s.uEDX != 0; uECX++) 284 255 { … … 287 258 RTTESTI_CHECK_BREAK(uECX < 128); 288 259 } 260 else if ( iStd == 0x0f /* Platform qualifity of service monitoring (PQM) */ 261 || iStd == 0x10 /* Platform qualifity of service enforcement (PQE) */ 262 || iStd == 0x14 /* Trace Enumeration Leafs */) 263 { 264 /** @todo */ 265 } 266 else 267 { 268 u32 = ASMCpuId_EAX(iStd); 269 CHECKVAL(u32, s.uEAX, "%x"); 270 271 uint32_t u32EbxMask = UINT32_MAX; 272 if (iStd == 1) 273 u32EbxMask = UINT32_C(0x00ffffff); /* Omit the local apic ID in case we're rescheduled. */ 274 u32 = ASMCpuId_EBX(iStd); 275 CHECKVAL(u32 & u32EbxMask, s.uEBX & u32EbxMask, "%x"); 276 277 u32 = ASMCpuId_ECX(iStd); 278 CHECKVAL(u32, s.uECX, "%x"); 279 u32 = ASMCpuId_EDX(iStd); 280 CHECKVAL(u32, s.uEDX, "%x"); 281 282 uECX2 = s.uECX - 1; 283 uEDX2 = s.uEDX - 1; 284 ASMCpuId_ECX_EDX(iStd, &uECX2, &uEDX2); 285 CHECKVAL(uECX2, s.uECX, "%x"); 286 CHECKVAL(uEDX2, s.uEDX, "%x"); 287 288 uEAX2 = s.uEAX - 1; 289 uEBX2 = s.uEBX - 1; 290 uECX2 = s.uECX - 1; 291 uEDX2 = s.uEDX - 1; 292 ASMCpuId(iStd, &uEAX2, &uEBX2, &uECX2, &uEDX2); 293 CHECKVAL(uEAX2, s.uEAX, "%x"); 294 CHECKVAL(uEBX2 & u32EbxMask, s.uEBX & u32EbxMask, "%x"); 295 CHECKVAL(uECX2, s.uECX, "%x"); 296 CHECKVAL(uEDX2, s.uEDX, "%x"); 297 } 289 298 } 290 299 … … 413 422 uEDX2 = s.uEDX - 1; 414 423 ASMCpuId_ECX_EDX(iExt, &uECX2, &uEDX2); 424 CHECKVAL(uECX2, s.uECX, "%x"); 425 CHECKVAL(uEDX2, s.uEDX, "%x"); 426 427 uEAX2 = s.uEAX - 1; 428 uEBX2 = s.uEBX - 1; 429 uECX2 = s.uECX - 1; 430 uEDX2 = s.uEDX - 1; 431 ASMCpuId(iExt, &uEAX2, &uEBX2, &uECX2, &uEDX2); 432 CHECKVAL(uEAX2, s.uEAX, "%x"); 433 CHECKVAL(uEBX2, s.uEBX, "%x"); 415 434 CHECKVAL(uECX2, s.uECX, "%x"); 416 435 CHECKVAL(uEDX2, s.uEDX, "%x");
Note:
See TracChangeset
for help on using the changeset viewer.