VirtualBox

Changeset 96965 in vbox


Ignore:
Timestamp:
Oct 3, 2022 12:00:11 PM (2 years ago)
Author:
vboxsync
Message:

VMM/IEM: The long double constant replaced with RTFLOAT128 constant to prevent dependency of VBox-SoftFloat from floating point runtime on Windows, bugref:9898

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/tools/IEMGenFpuConstants.c

    r96659 r96965  
    253253    printf("};\n");
    254254
     255    mpfr_init2(One, 112 + 1);
     256    mpfr_set_ui(One, 1, MPFR_RNDD);
     257
     258    mpfr_init2(Val, 112 + 1);
     259    mpfr_exp(Val, One, MPFR_RNDD);
     260    mpfr_log2(Val, Val, MPFR_RNDD);
     261
     262    PrintF128(Val, "g_r128Log2e", "The log2e constant as 128-bit floating point value.");
     263
    255264    mpfr_clear(ValXX);
    256265    mpfr_clear(ValX);
  • trunk/src/libs/softfloat-3e/source/extF80_log2.c

    r96904 r96965  
    6464}
    6565
     66/** The log2e constant as 128-bit floating point value.
     67 * base-10: 1.44269504088896340735992468100189185
     68 * base-16: 1.71547652b82fe1777d0ffda0d239
     69 * base-2 : 1.0111000101010100011101100101001010111000001011111110000101110111011111010000111111111101101000001101001000111001 */
     70const RTFLOAT128U g_r128Log2e = RTFLOAT128U_INIT_C(0, 0x71547652b82f, 0xe1777d0ffda0d239, 0x3fff);
     71
    6672extFloat80_t extF80_ylog2xp1(extFloat80_t y, extFloat80_t x SOFTFLOAT_STATE_DECL_COMMA)
    6773{
    68     union { extFloat80_t f; long double r; } uLog2e;
    69     extFloat80_t v;
    70 
    71     uLog2e.r = 1.442695L;
    72     v = uLog2e.f;
     74    extFloat80_t v = f128_to_extF80(*(float128_t *)&g_r128Log2e, pState);
    7375
    7476    v = extF80_mul(v, y, pState);
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