VirtualBox

Changeset 96655 in vbox


Ignore:
Timestamp:
Sep 8, 2022 11:10:56 AM (2 years ago)
Author:
vboxsync
Message:

VMM/IEM: Overflow of unsigned long fixed for a20 and a21, bugref:9898

Location:
trunk/src/VBox/VMM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp

    r96652 r96655  
    624624    RTFLOAT128U_INIT_C(0, 0xe542ba402022, 0x507a9cad2bf8f0ba, 0x3fc1),
    625625    /* a20
    626      * base-10: 7.04351638180413298434020229233492164e-20
    627      * base-16: 1.4c9ee35db1d1f3c946fdcd48fd88@-16
    628      * base-2 : 1.0100110010011110111000110101110110110001110100011111001111001001010001101111110111001101010010001111110110001000e-64 */
    629     RTFLOAT128U_INIT_C(0, 0x4c9ee35db1d1, 0xf3c946fdcd48fd88, 0x3fbf),
     626     * base-10: 1.95729410633912612308475743735054143e-20
     627     * base-16: 5.c6e3bdb73d5c62fbc51bf3b9b8fc@-17
     628     * base-2 : 1.0111000110111000111011110110110111001111010101110001100010111110111100010100011011111100111011100110111000111111e-66 */
     629    RTFLOAT128U_INIT_C(0, 0x71b8ef6dcf57, 0x18bef146fcee6e3f, 0x3fbd),
    630630    /* a21
    631      * base-10: 5.81527769640186708776361513365257702e-20
    632      * base-16: 1.129e64bff606a2b9c9fc624481cd@-16
    633      * base-2 : 1.0001001010011110011001001011111111110110000001101010001010111001110010011111110001100010010001001000000111001101e-64 */
    634     RTFLOAT128U_INIT_C(0, 0x129e64bff606, 0xa2b9c9fc624481cd, 0x3fbf),
     631     * base-10: 8.89679139245057328674889744250246106e-22
     632     * base-16: 4.338e5b6dfe14a5143242dfcce3a0@-18
     633     * base-2 : 1.0000110011100011100101101101101101111111100001010010100101000101000011001001000010110111111100110011100011101000e-70 */
     634    RTFLOAT128U_INIT_C(0, 0x0ce396db7f85, 0x29450c90b7f338e8, 0x3fb9),
    635635};
    636636
  • trunk/src/VBox/VMM/tools/IEMGenFpuConstants.c

    r96407 r96655  
    133133
    134134    mpfr_init2(Val, 112 + 1);
    135     unsigned long uFactorial = 1; AssertCompile(sizeof(uFactorial) >= 8);
     135    mpfr_set_ui(Val, 1, MPFR_RNDD);
    136136    for (unsigned a = 1; a < 22; a++)
    137137    {
    138         uFactorial *= (a + 1);
    139         mpfr_div_ui(Val, One, uFactorial, MPFR_RNDD);
     138        mpfr_div_ui(Val, Val, a + 1, MPFR_RNDD);
    140139        PrintF128(Val, NULL, "a%u", a);
    141140    }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette