Changeset 104847 in vbox for trunk/src/VBox
- Timestamp:
- Jun 5, 2024 8:26:34 AM (10 months ago)
- svn:sync-xref-src-repo-rev:
- 163440
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-4.c32
r104825 r104847 108 108 /** Fraction width (in bits) for the double-precision floating-point format. */ 109 109 #define BS3_FP64_FRACTION_BITS RTFLOAT64U_FRACTION_BITS 110 /** The max fraction value for a double-precision floating-point denormal. */ 111 #define BS3_FP64_FRACTION_DENORMAL_MAX 0xfffffffffffff 112 /** The min fraction value for a double-precision floating-point denormal. */ 113 #define BS3_FP64_FRACTION_DENORMAL_MIN 1 110 114 111 115 #define BS3_FP64_NORMAL_MAX(a_Sign) RTFLOAT64U_INIT_C(a_Sign, BS3_FP64_FRACTION_NORMAL_MAX, BS3_FP64_EXP_NORMAL_MAX) … … 132 136 /* The minimum integer value without losing precision. */ 133 137 #define BS3_FP64_NORMAL_SAFE_INT_MIN(a_Sign) RTFLOAT64U_INIT_C(a_Sign, 0, 1) 138 /** The maximum denormal value. */ 139 #define BS3_FP64_DENORMAL_MAX(a_Sign) RTFLOAT64U_INIT_C(a_Sign, BS3_FP64_FRACTION_DENORMAL_MAX, 0) 140 /** The maximum denormal value. */ 141 #define BS3_FP64_DENORMAL_MIN(a_Sign) RTFLOAT64U_INIT_C(a_Sign, BS3_FP64_FRACTION_DENORMAL_MIN, 0) 134 142 135 143 … … 1200 1208 BS3CPUINSTR4_TEST1_CTX_T TestCtx; 1201 1209 if (BS3_SKIPIT(bRing, iCfg, iTest, iVal, 0)) 1210 continue; 1211 1212 /* 1213 * If the hardware does not support DAZ bit and we are testing DE exceptions, 1214 * then skip testing them. We still want to test values that set the MXCSR.DAZ 1215 * if we are not expecting DE exceptions to make sure DAZ bit in and of itself 1216 * is not influencing other cases. 1217 */ 1218 if ( !g_fMxCsrDazSupported 1219 && pTest->paValues[iVal].fDenormalsAreZero 1220 && (pTest->paValues[iVal].fExpectedMxCsrFlags & X86_MXCSR_DE)) 1202 1221 continue; 1203 1222 … … 1448 1467 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_ZERO, 1449 1468 /*flags */ X86_MXCSR_PE }, 1469 /*15*/{ { /*src2 */ { BS3_FP64_VAL(0, 0xc000000000000, 0x3ff)/* 1.75*/, BS3_FP64_NORMAL_MAX(0), BS3_FP64_ZERO(0), BS3_FP64_VAL(0, 0, 0x3fd)/*0.25*/ } }, 1470 { /*src1 */ { BS3_FP64_VAL(1, 0, 0x07d)/*-0.25*/, BS3_FP64_NORMAL_MAX(1), BS3_FP64_ZERO(0), BS3_FP64_VAL(0, 0, 0x3fe)/*0.50*/ } }, 1471 { /* => */ { BS3_FP64_VAL(0, 0xbffffffffffff, 0x3ff)/* 1.50*/, BS3_FP64_ZERO(1), BS3_FP64_ZERO(0), BS3_FP64_VAL(0, 0x8000000000000, 0x3fe)/*0.75*/ } }, 1472 /*mask */ X86_MXCSR_XCPT_MASK, 1473 /*daz,fz,rc*/ 1, 1, X86_MXCSR_RC_DOWN, 1474 /*flags */ X86_MXCSR_PE }, 1450 1475 /* 1451 1476 * Normals. 1452 1477 */ 1453 /*1 5*/{ { /*src2 */ { BS3_FP64_NORMAL_MAX(0), BS3_FP64_NORMAL_VAL_1(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } },1478 /*16*/{ { /*src2 */ { BS3_FP64_NORMAL_MAX(0), BS3_FP64_NORMAL_VAL_1(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1454 1479 { /*src1 */ { BS3_FP64_NORMAL_MAX(1), BS3_FP64_NORMAL_VAL_1(1), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1455 1480 { /* => */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, … … 1457 1482 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1458 1483 /*flags */ 0 }, 1459 /*1 6*/{ { /*src2 */ { BS3_FP64_VAL(0, 0, 0x409)/*1024*/, BS3_FP64_VAL(0, 0xb800000000000, 0x404)/*55*/, BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } },1484 /*17*/{ { /*src2 */ { BS3_FP64_VAL(0, 0, 0x409)/*1024*/, BS3_FP64_VAL(0, 0xb800000000000, 0x404)/*55*/, BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1460 1485 { /*src1 */ { BS3_FP64_VAL(0, 0, 0x408)/* 512*/, BS3_FP64_VAL(0, 0xc000000000000, 0x401)/* 7*/, BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1461 1486 { /* => */ { BS3_FP64_VAL(0, 0x8000000000000, 0x409)/*1536*/, BS3_FP64_VAL(0, 0xf000000000000, 0x404)/*62*/, BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, … … 1463 1488 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1464 1489 /*flags */ 0 }, 1465 /*1 7*/{ { /*src2 */ { BS3_FP64_VAL(0, 0x26580b4800000, 0x41d)/* 1234567890*/, BS3_FP64_VAL(0, 0xd6f3458800000, 0x41c)/*987654321*/, BS3_FP64_ZERO(0), BS3_FP64_VAL(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/ } },1490 /*18*/{ { /*src2 */ { BS3_FP64_VAL(0, 0x26580b4800000, 0x41d)/* 1234567890*/, BS3_FP64_VAL(0, 0xd6f3458800000, 0x41c)/*987654321*/, BS3_FP64_ZERO(0), BS3_FP64_VAL(0, 0xcf0033a34f337, 0x432)/*4072598000007579.5*/ } }, 1466 1491 { /*src1 */ { BS3_FP64_VAL(1, 0x26580b4800000, 0x41d)/*-1234567890*/, BS3_FP64_VAL(1, 0x9000000000000, 0x405)/* -100*/, BS3_FP64_ZERO(0), BS3_FP64_VAL(0, 0xd6eca42000000, 0x419)/* 123450000.5*/ } }, 1467 1492 { /* => */ { BS3_FP64_ZERO(0), BS3_FP64_VAL(0, 0xd6f3426800000, 0x41c)/*987654221*/, BS3_FP64_ZERO(0), BS3_FP64_VAL(0, 0xcf00348ec5858, 0x432)/*4072598123457580.0*/ } }, … … 1469 1494 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1470 1495 /*flags */ 0 }, 1471 /*1 8*/{ { /*src2 */ { BS3_FP64_VAL(0, BS3_FP64_FRACTION_NORMAL_MAX - 1, BS3_FP64_EXP_BIAS + BS3_FP64_FRACTION_BITS), BS3_FP64_NORMAL_SAFE_INT_MAX(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } },1496 /*19*/{ { /*src2 */ { BS3_FP64_VAL(0, BS3_FP64_FRACTION_NORMAL_MAX - 1, BS3_FP64_EXP_BIAS + BS3_FP64_FRACTION_BITS), BS3_FP64_NORMAL_SAFE_INT_MAX(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1472 1497 { /*src1 */ { BS3_FP64_ONE(0), BS3_FP64_ONE(1), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1473 1498 { /* => */ { BS3_FP64_NORMAL_SAFE_INT_MAX(0), BS3_FP64_VAL(0, BS3_FP64_FRACTION_NORMAL_MAX - 1, BS3_FP64_EXP_BIAS + BS3_FP64_FRACTION_BITS), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, … … 1475 1500 /*daz,fz,rc*/ 1, 1, X86_MXCSR_RC_ZERO, 1476 1501 /*flags */ 0 }, 1477 /* 19*/{ { /*src2 */ { BS3_FP64_NORMAL_SAFE_INT_MAX(0), BS3_FP64_ONE(1), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } },1502 /*20*/{ { /*src2 */ { BS3_FP64_NORMAL_SAFE_INT_MAX(0), BS3_FP64_ONE(1), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1478 1503 { /*src1 */ { BS3_FP64_ONE(0), BS3_FP64_NORMAL_SAFE_INT_MAX(1), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1479 1504 { /* => */ { BS3_FP64_VAL(0, 0, BS3_FP64_EXP_BIAS + BS3_FP64_FRACTION_BITS + 1), BS3_FP64_VAL(1, 0, BS3_FP64_EXP_BIAS + BS3_FP64_FRACTION_BITS + 1), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, … … 1481 1506 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1482 1507 /*flags */ 0 }, 1483 /*2 0*/{ { /*src2 */ { BS3_FP64_NORMAL_SAFE_INT_MIN(0), BS3_FP64_ZERO(0), BS3_FP64_NORMAL_SAFE_INT_MIN(0), BS3_FP64_NORMAL_SAFE_INT_MIN(0) } },1508 /*21*/{ { /*src2 */ { BS3_FP64_NORMAL_SAFE_INT_MIN(0), BS3_FP64_ZERO(0), BS3_FP64_NORMAL_SAFE_INT_MIN(0), BS3_FP64_NORMAL_SAFE_INT_MIN(0) } }, 1484 1509 { /*src1 */ { BS3_FP64_NORMAL_SAFE_INT_MIN(1), BS3_FP64_NORMAL_SAFE_INT_MIN(1), BS3_FP64_ZERO(0), BS3_FP64_NORMAL_SAFE_INT_MIN(0) } }, 1485 1510 { /* => */ { BS3_FP64_ZERO(0), BS3_FP64_NORMAL_SAFE_INT_MIN(1), BS3_FP64_NORMAL_SAFE_INT_MIN(0), BS3_FP64_VAL(0, 0, 2) } }, 1486 1511 /*mask */ ~X86_MXCSR_XCPT_MASK, 1487 1512 /*daz,fz,rc*/ 1, 1, X86_MXCSR_RC_ZERO, 1513 /*flags */ 0 }, 1514 /*22*/{ { /*src2 */ { BS3_FP64_VAL(0, 0xc122186c3cfd0, 0x42d)/*123456789876543.25*/, BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_NORMAL_SAFE_INT_MIN(1) } }, 1515 { /*src1 */ { BS3_FP64_VAL(0, 0xb88e0395d49b0, 0x42d)/*121098765432102.75*/, BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_NORMAL_SAFE_INT_MIN(1) } }, 1516 { /* => */ { BS3_FP64_VAL(0, 0xbcd80e0108cc0, 0x42e)/*244555555308646 */, BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_VAL(1, 0, 2) } }, 1517 /*mask */ X86_MXCSR_XCPT_MASK, 1518 /*daz,fz,rc*/ 1, 1, X86_MXCSR_RC_DOWN, 1519 /*flags */ 0 }, 1520 /* 1521 * Denormals. 1522 */ 1523 /*23*/{ { /*src2 */ { BS3_FP64_DENORMAL_MAX(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1524 { /*src1 */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1525 { /* => */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1526 /*mask */ ~X86_MXCSR_XCPT_MASK, 1527 /*daz,fz,rc*/ 0, 0, X86_MXCSR_RC_NEAREST, 1528 /*flags */ X86_MXCSR_DE }, 1529 /*24*/{ { /*src2 */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1530 { /*src1 */ { BS3_FP64_ZERO(0), BS3_FP64_DENORMAL_MAX(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1531 { /* => */ { BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0), BS3_FP64_ZERO(0) } }, 1532 /*mask */ X86_MXCSR_XCPT_MASK, 1533 /*daz,fz,rc*/ 1, 0, X86_MXCSR_RC_NEAREST, 1488 1534 /*flags */ 0 }, 1489 1535 };
Note:
See TracChangeset
for help on using the changeset viewer.