mirror of
https://github.com/FEX-Emu/FEX.git
synced 2024-12-16 18:37:12 +00:00
SoftFloat-3e: Adds preserve_all attribute to all functions used
This will let FEX's JIT be more optimal
This commit is contained in:
parent
95e5d37e4c
commit
745729cdc2
@ -231,6 +231,15 @@ if (ENABLE_JIT_ARM64)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (_M_ARM_64 AND HAS_CLANG_PRESERVE_ALL)
|
||||||
|
list(APPEND DEFINES "-DFEXCORE_PRESERVE_ALL_ATTR=__attribute__((preserve_all));-DFEXCORE_HAS_PRESERVE_ALL_ATTR=1")
|
||||||
|
else()
|
||||||
|
list(APPEND DEFINES "-DFEXCORE_PRESERVE_ALL_ATTR=;-DFEXCORE_HAS_PRESERVE_ALL_ATTR=0")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Some defines for the softfloat library
|
||||||
|
list(APPEND DEFINES "-DSOFTFLOAT_BUILTIN_CLZ")
|
||||||
|
|
||||||
set (LIBS fmt::fmt vixl xxhash FEXHeaderUtils)
|
set (LIBS fmt::fmt vixl xxhash FEXHeaderUtils)
|
||||||
|
|
||||||
if (NOT MINGW_BUILD)
|
if (NOT MINGW_BUILD)
|
||||||
|
@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t extF80_add( extFloat80_t a, extFloat80_t b )
|
extFloat80_t extF80_add( extFloat80_t a, extFloat80_t b )
|
||||||
{
|
{
|
||||||
union { struct extFloat80M s; extFloat80_t f; } uA;
|
union { struct extFloat80M s; extFloat80_t f; } uA;
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t extF80_div( extFloat80_t a, extFloat80_t b )
|
extFloat80_t extF80_div( extFloat80_t a, extFloat80_t b )
|
||||||
{
|
{
|
||||||
union { struct extFloat80M s; extFloat80_t f; } uA;
|
union { struct extFloat80M s; extFloat80_t f; } uA;
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
bool extF80_eq( extFloat80_t a, extFloat80_t b )
|
bool extF80_eq( extFloat80_t a, extFloat80_t b )
|
||||||
{
|
{
|
||||||
union { struct extFloat80M s; extFloat80_t f; } uA;
|
union { struct extFloat80M s; extFloat80_t f; } uA;
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
bool extF80_lt( extFloat80_t a, extFloat80_t b )
|
bool extF80_lt( extFloat80_t a, extFloat80_t b )
|
||||||
{
|
{
|
||||||
union { struct extFloat80M s; extFloat80_t f; } uA;
|
union { struct extFloat80M s; extFloat80_t f; } uA;
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t extF80_mul( extFloat80_t a, extFloat80_t b )
|
extFloat80_t extF80_mul( extFloat80_t a, extFloat80_t b )
|
||||||
{
|
{
|
||||||
union { struct extFloat80M s; extFloat80_t f; } uA;
|
union { struct extFloat80M s; extFloat80_t f; } uA;
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t extF80_rem( extFloat80_t a, extFloat80_t b )
|
extFloat80_t extF80_rem( extFloat80_t a, extFloat80_t b )
|
||||||
{
|
{
|
||||||
union { struct extFloat80M s; extFloat80_t f; } uA;
|
union { struct extFloat80M s; extFloat80_t f; } uA;
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t
|
extFloat80_t
|
||||||
extF80_roundToInt( extFloat80_t a, uint_fast8_t roundingMode, bool exact )
|
extF80_roundToInt( extFloat80_t a, uint_fast8_t roundingMode, bool exact )
|
||||||
{
|
{
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t extF80_sqrt( extFloat80_t a )
|
extFloat80_t extF80_sqrt( extFloat80_t a )
|
||||||
{
|
{
|
||||||
union { struct extFloat80M s; extFloat80_t f; } uA;
|
union { struct extFloat80M s; extFloat80_t f; } uA;
|
||||||
|
@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t extF80_sub( extFloat80_t a, extFloat80_t b )
|
extFloat80_t extF80_sub( extFloat80_t a, extFloat80_t b )
|
||||||
{
|
{
|
||||||
union { struct extFloat80M s; extFloat80_t f; } uA;
|
union { struct extFloat80M s; extFloat80_t f; } uA;
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
float128_t extF80_to_f128( extFloat80_t a )
|
float128_t extF80_to_f128( extFloat80_t a )
|
||||||
{
|
{
|
||||||
union { struct extFloat80M s; extFloat80_t f; } uA;
|
union { struct extFloat80M s; extFloat80_t f; } uA;
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
float32_t extF80_to_f32( extFloat80_t a )
|
float32_t extF80_to_f32( extFloat80_t a )
|
||||||
{
|
{
|
||||||
union { struct extFloat80M s; extFloat80_t f; } uA;
|
union { struct extFloat80M s; extFloat80_t f; } uA;
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
float64_t extF80_to_f64( extFloat80_t a )
|
float64_t extF80_to_f64( extFloat80_t a )
|
||||||
{
|
{
|
||||||
union { struct extFloat80M s; extFloat80_t f; } uA;
|
union { struct extFloat80M s; extFloat80_t f; } uA;
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
int_fast32_t
|
int_fast32_t
|
||||||
extF80_to_i32( extFloat80_t a, uint_fast8_t roundingMode, bool exact )
|
extF80_to_i32( extFloat80_t a, uint_fast8_t roundingMode, bool exact )
|
||||||
{
|
{
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
int_fast64_t
|
int_fast64_t
|
||||||
extF80_to_i64( extFloat80_t a, uint_fast8_t roundingMode, bool exact )
|
extF80_to_i64( extFloat80_t a, uint_fast8_t roundingMode, bool exact )
|
||||||
{
|
{
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint_fast64_t
|
uint_fast64_t
|
||||||
extF80_to_ui64( extFloat80_t a, uint_fast8_t roundingMode, bool exact )
|
extF80_to_ui64( extFloat80_t a, uint_fast8_t roundingMode, bool exact )
|
||||||
{
|
{
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t f128_to_extF80( float128_t a )
|
extFloat80_t f128_to_extF80( float128_t a )
|
||||||
{
|
{
|
||||||
union ui128_f128 uA;
|
union ui128_f128 uA;
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t f32_to_extF80( float32_t a )
|
extFloat80_t f32_to_extF80( float32_t a )
|
||||||
{
|
{
|
||||||
union ui32_f32 uA;
|
union ui32_f32 uA;
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t f64_to_extF80( float64_t a )
|
extFloat80_t f64_to_extF80( float64_t a )
|
||||||
{
|
{
|
||||||
union ui64_f64 uA;
|
union ui64_f64 uA;
|
||||||
|
@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t i32_to_extF80( int32_t a )
|
extFloat80_t i32_to_extF80( int32_t a )
|
||||||
{
|
{
|
||||||
uint_fast16_t uiZ64;
|
uint_fast16_t uiZ64;
|
||||||
|
@ -68,9 +68,11 @@ uint_fast64_t
|
|||||||
uint_fast64_t softfloat_roundMToUI64( bool, uint32_t *, uint_fast8_t, bool );
|
uint_fast64_t softfloat_roundMToUI64( bool, uint32_t *, uint_fast8_t, bool );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
int_fast32_t softfloat_roundToI32( bool, uint_fast64_t, uint_fast8_t, bool );
|
int_fast32_t softfloat_roundToI32( bool, uint_fast64_t, uint_fast8_t, bool );
|
||||||
|
|
||||||
#ifdef SOFTFLOAT_FAST_INT64
|
#ifdef SOFTFLOAT_FAST_INT64
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
int_fast64_t
|
int_fast64_t
|
||||||
softfloat_roundToI64(
|
softfloat_roundToI64(
|
||||||
bool, uint_fast64_t, uint_fast64_t, uint_fast8_t, bool );
|
bool, uint_fast64_t, uint_fast64_t, uint_fast8_t, bool );
|
||||||
@ -109,8 +111,10 @@ float16_t
|
|||||||
#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF))
|
#define isNaNF32UI( a ) (((~(a) & 0x7F800000) == 0) && ((a) & 0x007FFFFF))
|
||||||
|
|
||||||
struct exp16_sig32 { int_fast16_t exp; uint_fast32_t sig; };
|
struct exp16_sig32 { int_fast16_t exp; uint_fast32_t sig; };
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct exp16_sig32 softfloat_normSubnormalF32Sig( uint_fast32_t );
|
struct exp16_sig32 softfloat_normSubnormalF32Sig( uint_fast32_t );
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
float32_t softfloat_roundPackToF32( bool, int_fast16_t, uint_fast32_t );
|
float32_t softfloat_roundPackToF32( bool, int_fast16_t, uint_fast32_t );
|
||||||
float32_t softfloat_normRoundPackToF32( bool, int_fast16_t, uint_fast32_t );
|
float32_t softfloat_normRoundPackToF32( bool, int_fast16_t, uint_fast32_t );
|
||||||
|
|
||||||
@ -130,8 +134,10 @@ float32_t
|
|||||||
#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF )))
|
#define isNaNF64UI( a ) (((~(a) & UINT64_C( 0x7FF0000000000000 )) == 0) && ((a) & UINT64_C( 0x000FFFFFFFFFFFFF )))
|
||||||
|
|
||||||
struct exp16_sig64 { int_fast16_t exp; uint_fast64_t sig; };
|
struct exp16_sig64 { int_fast16_t exp; uint_fast64_t sig; };
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct exp16_sig64 softfloat_normSubnormalF64Sig( uint_fast64_t );
|
struct exp16_sig64 softfloat_normSubnormalF64Sig( uint_fast64_t );
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
float64_t softfloat_roundPackToF64( bool, int_fast16_t, uint_fast64_t );
|
float64_t softfloat_roundPackToF64( bool, int_fast16_t, uint_fast64_t );
|
||||||
float64_t softfloat_normRoundPackToF64( bool, int_fast16_t, uint_fast64_t );
|
float64_t softfloat_normRoundPackToF64( bool, int_fast16_t, uint_fast64_t );
|
||||||
|
|
||||||
@ -155,11 +161,14 @@ float64_t
|
|||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
struct exp32_sig64 { int_fast32_t exp; uint64_t sig; };
|
struct exp32_sig64 { int_fast32_t exp; uint64_t sig; };
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct exp32_sig64 softfloat_normSubnormalExtF80Sig( uint_fast64_t );
|
struct exp32_sig64 softfloat_normSubnormalExtF80Sig( uint_fast64_t );
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t
|
extFloat80_t
|
||||||
softfloat_roundPackToExtF80(
|
softfloat_roundPackToExtF80(
|
||||||
bool, int_fast32_t, uint_fast64_t, uint_fast64_t, uint_fast8_t );
|
bool, int_fast32_t, uint_fast64_t, uint_fast64_t, uint_fast8_t );
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t
|
extFloat80_t
|
||||||
softfloat_normRoundPackToExtF80(
|
softfloat_normRoundPackToExtF80(
|
||||||
bool, int_fast32_t, uint_fast64_t, uint_fast64_t, uint_fast8_t );
|
bool, int_fast32_t, uint_fast64_t, uint_fast64_t, uint_fast8_t );
|
||||||
@ -181,6 +190,7 @@ extFloat80_t
|
|||||||
#define isNaNF128UI( a64, a0 ) (((~(a64) & UINT64_C( 0x7FFF000000000000 )) == 0) && (a0 || ((a64) & UINT64_C( 0x0000FFFFFFFFFFFF ))))
|
#define isNaNF128UI( a64, a0 ) (((~(a64) & UINT64_C( 0x7FFF000000000000 )) == 0) && (a0 || ((a64) & UINT64_C( 0x0000FFFFFFFFFFFF ))))
|
||||||
|
|
||||||
struct exp32_sig128 { int_fast32_t exp; struct uint128 sig; };
|
struct exp32_sig128 { int_fast32_t exp; struct uint128 sig; };
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct exp32_sig128
|
struct exp32_sig128
|
||||||
softfloat_normSubnormalF128Sig( uint_fast64_t, uint_fast64_t );
|
softfloat_normSubnormalF128Sig( uint_fast64_t, uint_fast64_t );
|
||||||
|
|
||||||
|
@ -53,6 +53,7 @@ INLINE
|
|||||||
uint64_t softfloat_shortShiftRightJam64( uint64_t a, uint_fast8_t dist )
|
uint64_t softfloat_shortShiftRightJam64( uint64_t a, uint_fast8_t dist )
|
||||||
{ return a>>dist | ((a & (((uint_fast64_t) 1<<dist) - 1)) != 0); }
|
{ return a>>dist | ((a & (((uint_fast64_t) 1<<dist) - 1)) != 0); }
|
||||||
#else
|
#else
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint64_t softfloat_shortShiftRightJam64( uint64_t a, uint_fast8_t dist );
|
uint64_t softfloat_shortShiftRightJam64( uint64_t a, uint_fast8_t dist );
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -74,6 +75,7 @@ INLINE uint32_t softfloat_shiftRightJam32( uint32_t a, uint_fast16_t dist )
|
|||||||
(dist < 31) ? a>>dist | ((uint32_t) (a<<(-dist & 31)) != 0) : (a != 0);
|
(dist < 31) ? a>>dist | ((uint32_t) (a<<(-dist & 31)) != 0) : (a != 0);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint32_t softfloat_shiftRightJam32( uint32_t a, uint_fast16_t dist );
|
uint32_t softfloat_shiftRightJam32( uint32_t a, uint_fast16_t dist );
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -95,6 +97,7 @@ INLINE uint64_t softfloat_shiftRightJam64( uint64_t a, uint_fast32_t dist )
|
|||||||
(dist < 63) ? a>>dist | ((uint64_t) (a<<(-dist & 63)) != 0) : (a != 0);
|
(dist < 63) ? a>>dist | ((uint64_t) (a<<(-dist & 63)) != 0) : (a != 0);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint64_t softfloat_shiftRightJam64( uint64_t a, uint_fast32_t dist );
|
uint64_t softfloat_shiftRightJam64( uint64_t a, uint_fast32_t dist );
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -148,6 +151,7 @@ INLINE uint_fast8_t softfloat_countLeadingZeros32( uint32_t a )
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint_fast8_t softfloat_countLeadingZeros32( uint32_t a );
|
uint_fast8_t softfloat_countLeadingZeros32( uint32_t a );
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -157,6 +161,7 @@ uint_fast8_t softfloat_countLeadingZeros32( uint32_t a );
|
|||||||
| Returns the number of leading 0 bits before the most-significant 1 bit of
|
| Returns the number of leading 0 bits before the most-significant 1 bit of
|
||||||
| 'a'. If 'a' is zero, 64 is returned.
|
| 'a'. If 'a' is zero, 64 is returned.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint_fast8_t softfloat_countLeadingZeros64( uint64_t a );
|
uint_fast8_t softfloat_countLeadingZeros64( uint64_t a );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -178,6 +183,7 @@ extern const uint16_t softfloat_approxRecip_1k1s[16];
|
|||||||
#ifdef SOFTFLOAT_FAST_DIV64TO32
|
#ifdef SOFTFLOAT_FAST_DIV64TO32
|
||||||
#define softfloat_approxRecip32_1( a ) ((uint32_t) (UINT64_C( 0x7FFFFFFFFFFFFFFF ) / (uint32_t) (a)))
|
#define softfloat_approxRecip32_1( a ) ((uint32_t) (UINT64_C( 0x7FFFFFFFFFFFFFFF ) / (uint32_t) (a)))
|
||||||
#else
|
#else
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint32_t softfloat_approxRecip32_1( uint32_t a );
|
uint32_t softfloat_approxRecip32_1( uint32_t a );
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -204,6 +210,7 @@ extern const uint16_t softfloat_approxRecipSqrt_1k1s[16];
|
|||||||
| returned is also always within the range 0.5 to 1; thus, the most-
|
| returned is also always within the range 0.5 to 1; thus, the most-
|
||||||
| significant bit of the result is always set.
|
| significant bit of the result is always set.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint32_t softfloat_approxRecipSqrt32_1( unsigned int oddExpA, uint32_t a );
|
uint32_t softfloat_approxRecipSqrt32_1( unsigned int oddExpA, uint32_t a );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -240,6 +247,7 @@ INLINE
|
|||||||
bool softfloat_le128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
|
bool softfloat_le128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
|
||||||
{ return (a64 < b64) || ((a64 == b64) && (a0 <= b0)); }
|
{ return (a64 < b64) || ((a64 == b64) && (a0 <= b0)); }
|
||||||
#else
|
#else
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
bool softfloat_le128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 );
|
bool softfloat_le128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 );
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -255,6 +263,7 @@ INLINE
|
|||||||
bool softfloat_lt128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
|
bool softfloat_lt128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
|
||||||
{ return (a64 < b64) || ((a64 == b64) && (a0 < b0)); }
|
{ return (a64 < b64) || ((a64 == b64) && (a0 < b0)); }
|
||||||
#else
|
#else
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
bool softfloat_lt128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 );
|
bool softfloat_lt128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 );
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -275,6 +284,7 @@ struct uint128
|
|||||||
return z;
|
return z;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128
|
struct uint128
|
||||||
softfloat_shortShiftLeft128( uint64_t a64, uint64_t a0, uint_fast8_t dist );
|
softfloat_shortShiftLeft128( uint64_t a64, uint64_t a0, uint_fast8_t dist );
|
||||||
#endif
|
#endif
|
||||||
@ -296,6 +306,7 @@ struct uint128
|
|||||||
return z;
|
return z;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128
|
struct uint128
|
||||||
softfloat_shortShiftRight128( uint64_t a64, uint64_t a0, uint_fast8_t dist );
|
softfloat_shortShiftRight128( uint64_t a64, uint64_t a0, uint_fast8_t dist );
|
||||||
#endif
|
#endif
|
||||||
@ -413,6 +424,7 @@ struct uint64_extra
|
|||||||
return z;
|
return z;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint64_extra
|
struct uint64_extra
|
||||||
softfloat_shiftRightJam64Extra(
|
softfloat_shiftRightJam64Extra(
|
||||||
uint64_t a, uint64_t extra, uint_fast32_t dist );
|
uint64_t a, uint64_t extra, uint_fast32_t dist );
|
||||||
@ -492,6 +504,7 @@ struct uint128
|
|||||||
return z;
|
return z;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128
|
struct uint128
|
||||||
softfloat_add128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 );
|
softfloat_add128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 );
|
||||||
#endif
|
#endif
|
||||||
@ -528,6 +541,7 @@ struct uint128
|
|||||||
return z;
|
return z;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128
|
struct uint128
|
||||||
softfloat_sub128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 );
|
softfloat_sub128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 );
|
||||||
#endif
|
#endif
|
||||||
@ -562,6 +576,7 @@ INLINE struct uint128 softfloat_mul64ByShifted32To128( uint64_t a, uint32_t b )
|
|||||||
return z;
|
return z;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128 softfloat_mul64ByShifted32To128( uint64_t a, uint32_t b );
|
struct uint128 softfloat_mul64ByShifted32To128( uint64_t a, uint32_t b );
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -570,6 +585,7 @@ struct uint128 softfloat_mul64ByShifted32To128( uint64_t a, uint32_t b );
|
|||||||
/*----------------------------------------------------------------------------
|
/*----------------------------------------------------------------------------
|
||||||
| Returns the 128-bit product of 'a' and 'b'.
|
| Returns the 128-bit product of 'a' and 'b'.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128 softfloat_mul64To128( uint64_t a, uint64_t b );
|
struct uint128 softfloat_mul64To128( uint64_t a, uint64_t b );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#ifndef softfloat_add128
|
#ifndef softfloat_add128
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128
|
struct uint128
|
||||||
softfloat_add128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
|
softfloat_add128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
|
||||||
{
|
{
|
||||||
|
@ -42,6 +42,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
extern const uint16_t softfloat_approxRecip_1k0s[16];
|
extern const uint16_t softfloat_approxRecip_1k0s[16];
|
||||||
extern const uint16_t softfloat_approxRecip_1k1s[16];
|
extern const uint16_t softfloat_approxRecip_1k1s[16];
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint32_t softfloat_approxRecip32_1( uint32_t a )
|
uint32_t softfloat_approxRecip32_1( uint32_t a )
|
||||||
{
|
{
|
||||||
int index;
|
int index;
|
||||||
|
@ -42,6 +42,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
extern const uint16_t softfloat_approxRecipSqrt_1k0s[];
|
extern const uint16_t softfloat_approxRecipSqrt_1k0s[];
|
||||||
extern const uint16_t softfloat_approxRecipSqrt_1k1s[];
|
extern const uint16_t softfloat_approxRecipSqrt_1k1s[];
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint32_t softfloat_approxRecipSqrt32_1( unsigned int oddExpA, uint32_t a )
|
uint32_t softfloat_approxRecipSqrt32_1( unsigned int oddExpA, uint32_t a )
|
||||||
{
|
{
|
||||||
int index;
|
int index;
|
||||||
|
@ -44,6 +44,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
| floating-point NaN, and returns the bit pattern of this value as an unsigned
|
| floating-point NaN, and returns the bit pattern of this value as an unsigned
|
||||||
| integer.
|
| integer.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr )
|
struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr )
|
||||||
{
|
{
|
||||||
struct uint128 uiZ;
|
struct uint128 uiZ;
|
||||||
|
@ -43,6 +43,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
| Converts the common NaN pointed to by `aPtr' into a 128-bit floating-point
|
| Converts the common NaN pointed to by `aPtr' into a 128-bit floating-point
|
||||||
| NaN, and returns the bit pattern of this value as an unsigned integer.
|
| NaN, and returns the bit pattern of this value as an unsigned integer.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN *aPtr )
|
struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN *aPtr )
|
||||||
{
|
{
|
||||||
struct uint128 uiZ;
|
struct uint128 uiZ;
|
||||||
|
@ -42,6 +42,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
| Converts the common NaN pointed to by `aPtr' into a 32-bit floating-point
|
| Converts the common NaN pointed to by `aPtr' into a 32-bit floating-point
|
||||||
| NaN, and returns the bit pattern of this value as an unsigned integer.
|
| NaN, and returns the bit pattern of this value as an unsigned integer.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint_fast32_t softfloat_commonNaNToF32UI( const struct commonNaN *aPtr )
|
uint_fast32_t softfloat_commonNaNToF32UI( const struct commonNaN *aPtr )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
| Converts the common NaN pointed to by `aPtr' into a 64-bit floating-point
|
| Converts the common NaN pointed to by `aPtr' into a 64-bit floating-point
|
||||||
| NaN, and returns the bit pattern of this value as an unsigned integer.
|
| NaN, and returns the bit pattern of this value as an unsigned integer.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint_fast64_t softfloat_commonNaNToF64UI( const struct commonNaN *aPtr )
|
uint_fast64_t softfloat_commonNaNToF64UI( const struct commonNaN *aPtr )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#define softfloat_countLeadingZeros32 softfloat_countLeadingZeros32
|
#define softfloat_countLeadingZeros32 softfloat_countLeadingZeros32
|
||||||
#include "primitives.h"
|
#include "primitives.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint_fast8_t softfloat_countLeadingZeros32( uint32_t a )
|
uint_fast8_t softfloat_countLeadingZeros32( uint32_t a )
|
||||||
{
|
{
|
||||||
uint_fast8_t count;
|
uint_fast8_t count;
|
||||||
|
@ -42,6 +42,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#define softfloat_countLeadingZeros64 softfloat_countLeadingZeros64
|
#define softfloat_countLeadingZeros64 softfloat_countLeadingZeros64
|
||||||
#include "primitives.h"
|
#include "primitives.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint_fast8_t softfloat_countLeadingZeros64( uint64_t a )
|
uint_fast8_t softfloat_countLeadingZeros64( uint64_t a )
|
||||||
{
|
{
|
||||||
uint_fast8_t count;
|
uint_fast8_t count;
|
||||||
|
@ -46,6 +46,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid
|
| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid
|
||||||
| exception is raised.
|
| exception is raised.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
void
|
void
|
||||||
softfloat_extF80UIToCommonNaN(
|
softfloat_extF80UIToCommonNaN(
|
||||||
uint_fast16_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr )
|
uint_fast16_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr )
|
||||||
|
@ -47,6 +47,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
| pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid exception
|
| pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid exception
|
||||||
| is raised.
|
| is raised.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
void
|
void
|
||||||
softfloat_f128UIToCommonNaN(
|
softfloat_f128UIToCommonNaN(
|
||||||
uint_fast64_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr )
|
uint_fast64_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr )
|
||||||
|
@ -45,6 +45,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid
|
| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid
|
||||||
| exception is raised.
|
| exception is raised.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
void softfloat_f32UIToCommonNaN( uint_fast32_t uiA, struct commonNaN *zPtr )
|
void softfloat_f32UIToCommonNaN( uint_fast32_t uiA, struct commonNaN *zPtr )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid
|
| location pointed to by `zPtr'. If the NaN is a signaling NaN, the invalid
|
||||||
| exception is raised.
|
| exception is raised.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
void softfloat_f64UIToCommonNaN( uint_fast64_t uiA, struct commonNaN *zPtr )
|
void softfloat_f64UIToCommonNaN( uint_fast64_t uiA, struct commonNaN *zPtr )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#ifndef softfloat_le128
|
#ifndef softfloat_le128
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
bool softfloat_le128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
|
bool softfloat_le128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#ifndef softfloat_lt128
|
#ifndef softfloat_lt128
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
bool softfloat_lt128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
|
bool softfloat_lt128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#ifndef softfloat_mul64ByShifted32To128
|
#ifndef softfloat_mul64ByShifted32To128
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128 softfloat_mul64ByShifted32To128( uint64_t a, uint32_t b )
|
struct uint128 softfloat_mul64ByShifted32To128( uint64_t a, uint32_t b )
|
||||||
{
|
{
|
||||||
uint_fast64_t mid;
|
uint_fast64_t mid;
|
||||||
|
@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#ifndef softfloat_mul64To128
|
#ifndef softfloat_mul64To128
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128 softfloat_mul64To128( uint64_t a, uint64_t b )
|
struct uint128 softfloat_mul64To128( uint64_t a, uint64_t b )
|
||||||
{
|
{
|
||||||
uint32_t a32, a0, b32, b0;
|
uint32_t a32, a0, b32, b0;
|
||||||
|
@ -39,6 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t
|
extFloat80_t
|
||||||
softfloat_normRoundPackToExtF80(
|
softfloat_normRoundPackToExtF80(
|
||||||
bool sign,
|
bool sign,
|
||||||
|
@ -38,6 +38,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct exp32_sig64 softfloat_normSubnormalExtF80Sig( uint_fast64_t sig )
|
struct exp32_sig64 softfloat_normSubnormalExtF80Sig( uint_fast64_t sig )
|
||||||
{
|
{
|
||||||
int_fast8_t shiftDist;
|
int_fast8_t shiftDist;
|
||||||
|
@ -38,6 +38,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct exp32_sig128
|
struct exp32_sig128
|
||||||
softfloat_normSubnormalF128Sig( uint_fast64_t sig64, uint_fast64_t sig0 )
|
softfloat_normSubnormalF128Sig( uint_fast64_t sig64, uint_fast64_t sig0 )
|
||||||
{
|
{
|
||||||
|
@ -38,6 +38,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct exp16_sig32 softfloat_normSubnormalF32Sig( uint_fast32_t sig )
|
struct exp16_sig32 softfloat_normSubnormalF32Sig( uint_fast32_t sig )
|
||||||
{
|
{
|
||||||
int_fast8_t shiftDist;
|
int_fast8_t shiftDist;
|
||||||
|
@ -38,6 +38,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct exp16_sig64 softfloat_normSubnormalF64Sig( uint_fast64_t sig )
|
struct exp16_sig64 softfloat_normSubnormalF64Sig( uint_fast64_t sig )
|
||||||
{
|
{
|
||||||
int_fast8_t shiftDist;
|
int_fast8_t shiftDist;
|
||||||
|
@ -50,6 +50,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
| result. If either original floating-point value is a signaling NaN, the
|
| result. If either original floating-point value is a signaling NaN, the
|
||||||
| invalid exception is raised.
|
| invalid exception is raised.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128
|
struct uint128
|
||||||
softfloat_propagateNaNExtF80UI(
|
softfloat_propagateNaNExtF80UI(
|
||||||
uint_fast16_t uiA64,
|
uint_fast16_t uiA64,
|
||||||
|
@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t
|
extFloat80_t
|
||||||
softfloat_roundPackToExtF80(
|
softfloat_roundPackToExtF80(
|
||||||
bool sign,
|
bool sign,
|
||||||
|
@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
float32_t
|
float32_t
|
||||||
softfloat_roundPackToF32( bool sign, int_fast16_t exp, uint_fast32_t sig )
|
softfloat_roundPackToF32( bool sign, int_fast16_t exp, uint_fast32_t sig )
|
||||||
{
|
{
|
||||||
|
@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
float64_t
|
float64_t
|
||||||
softfloat_roundPackToF64( bool sign, int_fast16_t exp, uint_fast64_t sig )
|
softfloat_roundPackToF64( bool sign, int_fast16_t exp, uint_fast64_t sig )
|
||||||
{
|
{
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
int_fast32_t
|
int_fast32_t
|
||||||
softfloat_roundToI32(
|
softfloat_roundToI32(
|
||||||
bool sign, uint_fast64_t sig, uint_fast8_t roundingMode, bool exact )
|
bool sign, uint_fast64_t sig, uint_fast8_t roundingMode, bool exact )
|
||||||
|
@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "specialize.h"
|
#include "specialize.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
int_fast64_t
|
int_fast64_t
|
||||||
softfloat_roundToI64(
|
softfloat_roundToI64(
|
||||||
bool sign,
|
bool sign,
|
||||||
|
@ -39,6 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#ifndef softfloat_shiftRightJam32
|
#ifndef softfloat_shiftRightJam32
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint32_t softfloat_shiftRightJam32( uint32_t a, uint_fast16_t dist )
|
uint32_t softfloat_shiftRightJam32( uint32_t a, uint_fast16_t dist )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#ifndef softfloat_shiftRightJam64
|
#ifndef softfloat_shiftRightJam64
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint64_t softfloat_shiftRightJam64( uint64_t a, uint_fast32_t dist )
|
uint64_t softfloat_shiftRightJam64( uint64_t a, uint_fast32_t dist )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#ifndef softfloat_shiftRightJam64Extra
|
#ifndef softfloat_shiftRightJam64Extra
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint64_extra
|
struct uint64_extra
|
||||||
softfloat_shiftRightJam64Extra(
|
softfloat_shiftRightJam64Extra(
|
||||||
uint64_t a, uint64_t extra, uint_fast32_t dist )
|
uint64_t a, uint64_t extra, uint_fast32_t dist )
|
||||||
|
@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#ifndef softfloat_shortShiftLeft128
|
#ifndef softfloat_shortShiftLeft128
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128
|
struct uint128
|
||||||
softfloat_shortShiftLeft128( uint64_t a64, uint64_t a0, uint_fast8_t dist )
|
softfloat_shortShiftLeft128( uint64_t a64, uint64_t a0, uint_fast8_t dist )
|
||||||
{
|
{
|
||||||
|
@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#ifndef softfloat_shortShiftRight128
|
#ifndef softfloat_shortShiftRight128
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128
|
struct uint128
|
||||||
softfloat_shortShiftRight128( uint64_t a64, uint64_t a0, uint_fast8_t dist )
|
softfloat_shortShiftRight128( uint64_t a64, uint64_t a0, uint_fast8_t dist )
|
||||||
{
|
{
|
||||||
|
@ -39,6 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#ifndef softfloat_shortShiftRightJam64
|
#ifndef softfloat_shortShiftRightJam64
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint64_t softfloat_shortShiftRightJam64( uint64_t a, uint_fast8_t dist )
|
uint64_t softfloat_shortShiftRightJam64( uint64_t a, uint_fast8_t dist )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
|
|
||||||
#ifndef softfloat_sub128
|
#ifndef softfloat_sub128
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128
|
struct uint128
|
||||||
softfloat_sub128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
|
softfloat_sub128( uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0 )
|
||||||
{
|
{
|
||||||
|
@ -92,6 +92,7 @@ enum {
|
|||||||
/*----------------------------------------------------------------------------
|
/*----------------------------------------------------------------------------
|
||||||
| Routine to raise any or all of the software floating-point exception flags.
|
| Routine to raise any or all of the software floating-point exception flags.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
void softfloat_raiseFlags( uint_fast8_t );
|
void softfloat_raiseFlags( uint_fast8_t );
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
/*----------------------------------------------------------------------------
|
||||||
@ -110,6 +111,7 @@ float16_t ui64_to_f16( uint64_t );
|
|||||||
float32_t ui64_to_f32( uint64_t );
|
float32_t ui64_to_f32( uint64_t );
|
||||||
float64_t ui64_to_f64( uint64_t );
|
float64_t ui64_to_f64( uint64_t );
|
||||||
#ifdef SOFTFLOAT_FAST_INT64
|
#ifdef SOFTFLOAT_FAST_INT64
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t ui64_to_extF80( uint64_t );
|
extFloat80_t ui64_to_extF80( uint64_t );
|
||||||
float128_t ui64_to_f128( uint64_t );
|
float128_t ui64_to_f128( uint64_t );
|
||||||
#endif
|
#endif
|
||||||
@ -119,6 +121,7 @@ float16_t i32_to_f16( int32_t );
|
|||||||
float32_t i32_to_f32( int32_t );
|
float32_t i32_to_f32( int32_t );
|
||||||
float64_t i32_to_f64( int32_t );
|
float64_t i32_to_f64( int32_t );
|
||||||
#ifdef SOFTFLOAT_FAST_INT64
|
#ifdef SOFTFLOAT_FAST_INT64
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t i32_to_extF80( int32_t );
|
extFloat80_t i32_to_extF80( int32_t );
|
||||||
float128_t i32_to_f128( int32_t );
|
float128_t i32_to_f128( int32_t );
|
||||||
#endif
|
#endif
|
||||||
@ -183,6 +186,7 @@ int_fast64_t f32_to_i64_r_minMag( float32_t, bool );
|
|||||||
float16_t f32_to_f16( float32_t );
|
float16_t f32_to_f16( float32_t );
|
||||||
float64_t f32_to_f64( float32_t );
|
float64_t f32_to_f64( float32_t );
|
||||||
#ifdef SOFTFLOAT_FAST_INT64
|
#ifdef SOFTFLOAT_FAST_INT64
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t f32_to_extF80( float32_t );
|
extFloat80_t f32_to_extF80( float32_t );
|
||||||
float128_t f32_to_f128( float32_t );
|
float128_t f32_to_f128( float32_t );
|
||||||
#endif
|
#endif
|
||||||
@ -218,6 +222,7 @@ int_fast64_t f64_to_i64_r_minMag( float64_t, bool );
|
|||||||
float16_t f64_to_f16( float64_t );
|
float16_t f64_to_f16( float64_t );
|
||||||
float32_t f64_to_f32( float64_t );
|
float32_t f64_to_f32( float64_t );
|
||||||
#ifdef SOFTFLOAT_FAST_INT64
|
#ifdef SOFTFLOAT_FAST_INT64
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t f64_to_extF80( float64_t );
|
extFloat80_t f64_to_extF80( float64_t );
|
||||||
float128_t f64_to_f128( float64_t );
|
float128_t f64_to_f128( float64_t );
|
||||||
#endif
|
#endif
|
||||||
@ -250,26 +255,41 @@ extern THREAD_LOCAL uint_fast8_t extF80_roundingPrecision;
|
|||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
#ifdef SOFTFLOAT_FAST_INT64
|
#ifdef SOFTFLOAT_FAST_INT64
|
||||||
uint_fast32_t extF80_to_ui32( extFloat80_t, uint_fast8_t, bool );
|
uint_fast32_t extF80_to_ui32( extFloat80_t, uint_fast8_t, bool );
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint_fast64_t extF80_to_ui64( extFloat80_t, uint_fast8_t, bool );
|
uint_fast64_t extF80_to_ui64( extFloat80_t, uint_fast8_t, bool );
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
int_fast32_t extF80_to_i32( extFloat80_t, uint_fast8_t, bool );
|
int_fast32_t extF80_to_i32( extFloat80_t, uint_fast8_t, bool );
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
int_fast64_t extF80_to_i64( extFloat80_t, uint_fast8_t, bool );
|
int_fast64_t extF80_to_i64( extFloat80_t, uint_fast8_t, bool );
|
||||||
uint_fast32_t extF80_to_ui32_r_minMag( extFloat80_t, bool );
|
uint_fast32_t extF80_to_ui32_r_minMag( extFloat80_t, bool );
|
||||||
uint_fast64_t extF80_to_ui64_r_minMag( extFloat80_t, bool );
|
uint_fast64_t extF80_to_ui64_r_minMag( extFloat80_t, bool );
|
||||||
int_fast32_t extF80_to_i32_r_minMag( extFloat80_t, bool );
|
int_fast32_t extF80_to_i32_r_minMag( extFloat80_t, bool );
|
||||||
int_fast64_t extF80_to_i64_r_minMag( extFloat80_t, bool );
|
int_fast64_t extF80_to_i64_r_minMag( extFloat80_t, bool );
|
||||||
float16_t extF80_to_f16( extFloat80_t );
|
float16_t extF80_to_f16( extFloat80_t );
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
float32_t extF80_to_f32( extFloat80_t );
|
float32_t extF80_to_f32( extFloat80_t );
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
float64_t extF80_to_f64( extFloat80_t );
|
float64_t extF80_to_f64( extFloat80_t );
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
float128_t extF80_to_f128( extFloat80_t );
|
float128_t extF80_to_f128( extFloat80_t );
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t extF80_roundToInt( extFloat80_t, uint_fast8_t, bool );
|
extFloat80_t extF80_roundToInt( extFloat80_t, uint_fast8_t, bool );
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t extF80_add( extFloat80_t, extFloat80_t );
|
extFloat80_t extF80_add( extFloat80_t, extFloat80_t );
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t extF80_sub( extFloat80_t, extFloat80_t );
|
extFloat80_t extF80_sub( extFloat80_t, extFloat80_t );
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t extF80_mul( extFloat80_t, extFloat80_t );
|
extFloat80_t extF80_mul( extFloat80_t, extFloat80_t );
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t extF80_div( extFloat80_t, extFloat80_t );
|
extFloat80_t extF80_div( extFloat80_t, extFloat80_t );
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t extF80_rem( extFloat80_t, extFloat80_t );
|
extFloat80_t extF80_rem( extFloat80_t, extFloat80_t );
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t extF80_sqrt( extFloat80_t );
|
extFloat80_t extF80_sqrt( extFloat80_t );
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
bool extF80_eq( extFloat80_t, extFloat80_t );
|
bool extF80_eq( extFloat80_t, extFloat80_t );
|
||||||
bool extF80_le( extFloat80_t, extFloat80_t );
|
bool extF80_le( extFloat80_t, extFloat80_t );
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
bool extF80_lt( extFloat80_t, extFloat80_t );
|
bool extF80_lt( extFloat80_t, extFloat80_t );
|
||||||
bool extF80_eq_signaling( extFloat80_t, extFloat80_t );
|
bool extF80_eq_signaling( extFloat80_t, extFloat80_t );
|
||||||
bool extF80_le_quiet( extFloat80_t, extFloat80_t );
|
bool extF80_le_quiet( extFloat80_t, extFloat80_t );
|
||||||
@ -320,6 +340,7 @@ int_fast64_t f128_to_i64_r_minMag( float128_t, bool );
|
|||||||
float16_t f128_to_f16( float128_t );
|
float16_t f128_to_f16( float128_t );
|
||||||
float32_t f128_to_f32( float128_t );
|
float32_t f128_to_f32( float128_t );
|
||||||
float64_t f128_to_f64( float128_t );
|
float64_t f128_to_f64( float128_t );
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t f128_to_extF80( float128_t );
|
extFloat80_t f128_to_extF80( float128_t );
|
||||||
float128_t f128_roundToInt( float128_t, uint_fast8_t, bool );
|
float128_t f128_roundToInt( float128_t, uint_fast8_t, bool );
|
||||||
float128_t f128_add( float128_t, float128_t );
|
float128_t f128_add( float128_t, float128_t );
|
||||||
|
@ -43,6 +43,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
| to substitute a result value. If traps are not implemented, this routine
|
| to substitute a result value. If traps are not implemented, this routine
|
||||||
| should be simply `softfloat_exceptionFlags |= flags;'.
|
| should be simply `softfloat_exceptionFlags |= flags;'.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
void softfloat_raiseFlags( uint_fast8_t flags )
|
void softfloat_raiseFlags( uint_fast8_t flags )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -135,12 +135,14 @@ uint_fast16_t
|
|||||||
| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
|
| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
|
||||||
| exception is raised.
|
| exception is raised.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
void softfloat_f32UIToCommonNaN( uint_fast32_t uiA, struct commonNaN *zPtr );
|
void softfloat_f32UIToCommonNaN( uint_fast32_t uiA, struct commonNaN *zPtr );
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
/*----------------------------------------------------------------------------
|
||||||
| Converts the common NaN pointed to by 'aPtr' into a 32-bit floating-point
|
| Converts the common NaN pointed to by 'aPtr' into a 32-bit floating-point
|
||||||
| NaN, and returns the bit pattern of this value as an unsigned integer.
|
| NaN, and returns the bit pattern of this value as an unsigned integer.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint_fast32_t softfloat_commonNaNToF32UI( const struct commonNaN *aPtr );
|
uint_fast32_t softfloat_commonNaNToF32UI( const struct commonNaN *aPtr );
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
/*----------------------------------------------------------------------------
|
||||||
@ -170,12 +172,14 @@ uint_fast32_t
|
|||||||
| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
|
| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
|
||||||
| exception is raised.
|
| exception is raised.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
void softfloat_f64UIToCommonNaN( uint_fast64_t uiA, struct commonNaN *zPtr );
|
void softfloat_f64UIToCommonNaN( uint_fast64_t uiA, struct commonNaN *zPtr );
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
/*----------------------------------------------------------------------------
|
||||||
| Converts the common NaN pointed to by 'aPtr' into a 64-bit floating-point
|
| Converts the common NaN pointed to by 'aPtr' into a 64-bit floating-point
|
||||||
| NaN, and returns the bit pattern of this value as an unsigned integer.
|
| NaN, and returns the bit pattern of this value as an unsigned integer.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
uint_fast64_t softfloat_commonNaNToF64UI( const struct commonNaN *aPtr );
|
uint_fast64_t softfloat_commonNaNToF64UI( const struct commonNaN *aPtr );
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
/*----------------------------------------------------------------------------
|
||||||
@ -215,6 +219,7 @@ uint_fast64_t
|
|||||||
| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
|
| location pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid
|
||||||
| exception is raised.
|
| exception is raised.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
void
|
void
|
||||||
softfloat_extF80UIToCommonNaN(
|
softfloat_extF80UIToCommonNaN(
|
||||||
uint_fast16_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr );
|
uint_fast16_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr );
|
||||||
@ -224,6 +229,7 @@ void
|
|||||||
| floating-point NaN, and returns the bit pattern of this value as an unsigned
|
| floating-point NaN, and returns the bit pattern of this value as an unsigned
|
||||||
| integer.
|
| integer.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr );
|
struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr );
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
/*----------------------------------------------------------------------------
|
||||||
@ -235,6 +241,7 @@ struct uint128 softfloat_commonNaNToExtF80UI( const struct commonNaN *aPtr );
|
|||||||
| result. If either original floating-point value is a signaling NaN, the
|
| result. If either original floating-point value is a signaling NaN, the
|
||||||
| invalid exception is raised.
|
| invalid exception is raised.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128
|
struct uint128
|
||||||
softfloat_propagateNaNExtF80UI(
|
softfloat_propagateNaNExtF80UI(
|
||||||
uint_fast16_t uiA64,
|
uint_fast16_t uiA64,
|
||||||
@ -264,6 +271,7 @@ struct uint128
|
|||||||
| pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid exception
|
| pointed to by 'zPtr'. If the NaN is a signaling NaN, the invalid exception
|
||||||
| is raised.
|
| is raised.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
void
|
void
|
||||||
softfloat_f128UIToCommonNaN(
|
softfloat_f128UIToCommonNaN(
|
||||||
uint_fast64_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr );
|
uint_fast64_t uiA64, uint_fast64_t uiA0, struct commonNaN *zPtr );
|
||||||
@ -272,6 +280,7 @@ void
|
|||||||
| Converts the common NaN pointed to by 'aPtr' into a 128-bit floating-point
|
| Converts the common NaN pointed to by 'aPtr' into a 128-bit floating-point
|
||||||
| NaN, and returns the bit pattern of this value as an unsigned integer.
|
| NaN, and returns the bit pattern of this value as an unsigned integer.
|
||||||
*----------------------------------------------------------------------------*/
|
*----------------------------------------------------------------------------*/
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN * );
|
struct uint128 softfloat_commonNaNToF128UI( const struct commonNaN * );
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------
|
/*----------------------------------------------------------------------------
|
||||||
|
@ -39,6 +39,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
#include "softfloat.h"
|
#include "softfloat.h"
|
||||||
|
|
||||||
|
FEXCORE_PRESERVE_ALL_ATTR
|
||||||
extFloat80_t ui64_to_extF80( uint64_t a )
|
extFloat80_t ui64_to_extF80( uint64_t a )
|
||||||
{
|
{
|
||||||
uint_fast16_t uiZ64;
|
uint_fast16_t uiZ64;
|
||||||
|
Loading…
Reference in New Issue
Block a user