Changeset 93893 in vbox for trunk/src/VBox/VMM/testcase
- Timestamp:
- Feb 22, 2022 9:27:58 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/testcase/tstIEMAImpl.cpp
r93888 r93893 1558 1558 1559 1559 /* 1560 * BSWAP 1561 */ 1562 static void BswapTest(void) 1563 { 1564 RTTestSub(g_hTest, "bswap_u16"); 1565 *g_pu32 = UINT32_C(0x12345678); 1566 iemAImpl_bswap_u16(g_pu32); 1567 #if 0 1568 RTTEST_CHECK_MSG(g_hTest, *g_pu32 == UINT32_C(0x12347856), (g_hTest, "*g_pu32=%#RX32\n", *g_pu32)); 1569 #else 1570 RTTEST_CHECK_MSG(g_hTest, *g_pu32 == UINT32_C(0x12340000), (g_hTest, "*g_pu32=%#RX32\n", *g_pu32)); 1571 #endif 1572 *g_pu32 = UINT32_C(0xffff1122); 1573 iemAImpl_bswap_u16(g_pu32); 1574 #if 0 1575 RTTEST_CHECK_MSG(g_hTest, *g_pu32 == UINT32_C(0xffff2211), (g_hTest, "*g_pu32=%#RX32\n", *g_pu32)); 1576 #else 1577 RTTEST_CHECK_MSG(g_hTest, *g_pu32 == UINT32_C(0xffff0000), (g_hTest, "*g_pu32=%#RX32\n", *g_pu32)); 1578 #endif 1579 1580 RTTestSub(g_hTest, "bswap_u32"); 1581 *g_pu32 = UINT32_C(0x12345678); 1582 iemAImpl_bswap_u32(g_pu32); 1583 RTTEST_CHECK(g_hTest, *g_pu32 == UINT32_C(0x78563412)); 1584 1585 RTTestSub(g_hTest, "bswap_u64"); 1586 *g_pu64 = UINT64_C(0x0123456789abcdef); 1587 iemAImpl_bswap_u64(g_pu64); 1588 RTTEST_CHECK(g_hTest, *g_pu64 == UINT64_C(0xefcdab8967452301)); 1589 } 1590 1591 1592 /* 1560 1593 * Random helpers. 1561 1594 */ … … 1683 1716 ShiftTest(); 1684 1717 MulDivTest(); 1718 BswapTest(); 1685 1719 } 1686 1720 return RTTestSummaryAndDestroy(g_hTest);
Note:
See TracChangeset
for help on using the changeset viewer.