VirtualBox

Changeset 94564 in vbox for trunk


Ignore:
Timestamp:
Apr 11, 2022 7:46:33 PM (3 years ago)
Author:
vboxsync
Message:

libs/softfloat: Corrected the setting our 'c1' flag in softfloat_roundPackToExtF80. The fsqrt implementation works now. bugref:9898

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/softfloat-3e/source/s_roundPackToExtF80.c

    r94558 r94564  
    122122    /*------------------------------------------------------------------------
    123123    *------------------------------------------------------------------------*/
     124    { /* VBox*/
     125    uint64_t const uOldSig = sig; /* VBox */
    124126    if ( roundBits ) {
    125127        softfloat_exceptionFlags |= softfloat_flag_inexact;
    126         if ( roundIncrement ) softfloat_exceptionFlags |= softfloat_flag_c1; /* VBox */
    127128#ifdef SOFTFLOAT_ROUND_ODD
    128129        if ( roundingMode == softfloat_round_odd ) {
    129130            sig = (sig & ~roundMask) | (roundMask + 1);
     131            if ( sig > uOldSig ) softfloat_exceptionFlags |= softfloat_flag_c1; /* VBox */
    130132            goto packReturn;
    131133        }
     
    136138        ++exp;
    137139        sig = UINT64_C( 0x8000000000000000 );
     140        softfloat_exceptionFlags |= softfloat_flag_c1; /* VBox */
    138141    }
    139142    roundIncrement = roundMask + 1;
     
    142145    }
    143146    sig &= ~roundMask;
     147    if ( sig > uOldSig ) softfloat_exceptionFlags |= softfloat_flag_c1; /* VBox */
    144148    goto packReturn;
     149    } /* VBox */
    145150    /*------------------------------------------------------------------------
    146151    *------------------------------------------------------------------------*/
     
    239244    }
    240245    if ( doIncrement ) {
    241         softfloat_exceptionFlags |= softfloat_flag_c1; /* VBox */
     246        uint64_t const uOldSig = sig; /* VBox */
    242247        ++sig;
    243248        if ( ! sig ) {
    244249            ++exp;
    245250            sig = UINT64_C( 0x8000000000000000 );
     251            softfloat_exceptionFlags |= softfloat_flag_c1; /* VBox */
    246252        } else {
    247253            sig &=
     
    249255                     (! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
    250256                          & roundNearEven);
     257            if ( sig > uOldSig ) softfloat_exceptionFlags |= softfloat_flag_c1; /* VBox */
    251258        }
    252259    }
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