aboutsummaryrefslogtreecommitdiff
path: root/softfloat/s_roundPackToUI64.c
diff options
context:
space:
mode:
Diffstat (limited to 'softfloat/s_roundPackToUI64.c')
-rwxr-xr-xsoftfloat/s_roundPackToUI64.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/softfloat/s_roundPackToUI64.c b/softfloat/s_roundPackToUI64.c
deleted file mode 100755
index 621170c..0000000
--- a/softfloat/s_roundPackToUI64.c
+++ /dev/null
@@ -1,48 +0,0 @@
-// See LICENSE.SoftFloat for license details.
-
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "softfloat.h"
-
-uint_fast64_t
- softfloat_roundPackToUI64(
- bool sign,
- uint_fast64_t sig64,
- uint_fast64_t sig0,
- int_fast8_t roundingMode,
- bool exact
- )
-{
- bool roundNearestEven, increment;
-
- roundNearestEven = ( roundingMode == softfloat_round_nearest_even );
- increment = ( UINT64_C( 0x8000000000000000 ) <= sig0 );
- if (
- ! roundNearestEven
- && ( roundingMode != softfloat_round_nearest_maxMag )
- ) {
- increment =
- ( roundingMode != softfloat_round_minMag )
- && ( roundingMode
- == ( sign ? softfloat_round_min : softfloat_round_max ) )
- && sig0;
- }
- if ( increment ) {
- ++sig64;
- if ( ! sig64 ) goto invalid;
- sig64 &=
- ~ ( ! ( sig0 & UINT64_C( 0x7FFFFFFFFFFFFFFF ) )
- & roundNearestEven );
- }
- if ( sign && sig64 ) goto invalid;
- if ( exact && sig0 ) softfloat_raiseFlags( softfloat_flag_inexact );
- return sig64;
- invalid:
- softfloat_raiseFlags( softfloat_flag_invalid );
- return UINT64_C( 0xFFFFFFFFFFFFFFFF );
-
-}
-