aboutsummaryrefslogtreecommitdiff
path: root/softfloat/s_roundPackToUI32.c
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>2011-06-12 20:27:10 -0700
committerAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>2011-06-12 20:27:10 -0700
commit740f981cfd55604d46598144dccac26dd53f643c (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /softfloat/s_roundPackToUI32.c
parentc0ebf99d6bb3ef3cf252703b50b849bcbaa2ec59 (diff)
downloadspike-740f981cfd55604d46598144dccac26dd53f643c.zip
spike-740f981cfd55604d46598144dccac26dd53f643c.tar.gz
spike-740f981cfd55604d46598144dccac26dd53f643c.tar.bz2
[sim] renamed to riscv-isa-run
Diffstat (limited to 'softfloat/s_roundPackToUI32.c')
-rwxr-xr-xsoftfloat/s_roundPackToUI32.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/softfloat/s_roundPackToUI32.c b/softfloat/s_roundPackToUI32.c
deleted file mode 100755
index ab44ec7..0000000
--- a/softfloat/s_roundPackToUI32.c
+++ /dev/null
@@ -1,44 +0,0 @@
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "platform.h"
-#include "internals.h"
-#include "softfloat.h"
-
-uint_fast32_t
- softfloat_roundPackToUI32(
- bool sign, uint_fast64_t sig, int_fast8_t roundingMode, bool exact )
-{
- bool roundNearestEven;
- int roundIncrement, roundBits;
- uint_fast32_t z;
-
- roundNearestEven = ( roundingMode == softfloat_round_nearest_even );
- roundIncrement = 0x40;
- if (
- ! roundNearestEven
- && ( roundingMode != softfloat_round_nearest_maxMag )
- ) {
- roundIncrement =
- ( roundingMode == softfloat_round_minMag )
- || ( roundingMode
- == ( sign ? softfloat_round_max : softfloat_round_min ) )
- ? 0
- : 0x7F;
- }
- roundBits = sig & 0x7F;
- sig += roundIncrement;
- if ( sig & UINT64_C( 0xFFFFFF8000000000 ) ) goto invalid;
- z = sig>>7;
- z &= ~ ( ! ( roundBits ^ 0x40 ) & roundNearestEven );
- if ( sign && z ) goto invalid;
- if ( exact && roundBits ) {
- softfloat_exceptionFlags |= softfloat_flag_inexact;
- }
- return z;
- invalid:
- softfloat_raiseFlags( softfloat_flag_invalid );
- return 0xFFFFFFFF;
-
-}
-