diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-02-22 19:27:37 -0800 |
---|---|---|
committer | Christopher Celio <celio@eecs.berkeley.edu> | 2015-02-22 19:27:37 -0800 |
commit | 7e4df4d518b5090eb76f88e6195d8206ae413ca7 (patch) | |
tree | bf38b1ac167f722779f4128a5086c6765d41972a /softfloat/f32_to_i32.c | |
parent | 1b15ab2ef5e2730540c42330f3f5681e6534a038 (diff) | |
download | spike-7e4df4d518b5090eb76f88e6195d8206ae413ca7.zip spike-7e4df4d518b5090eb76f88e6195d8206ae413ca7.tar.gz spike-7e4df4d518b5090eb76f88e6195d8206ae413ca7.tar.bz2 |
Softfloat fcvt.{w/h}.s now returns -MaxInt for -NaN
Behavior now consistent with RISC-V user spec.
Diffstat (limited to 'softfloat/f32_to_i32.c')
-rwxr-xr-x | softfloat/f32_to_i32.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/softfloat/f32_to_i32.c b/softfloat/f32_to_i32.c index bbbaee0..98c67c9 100755 --- a/softfloat/f32_to_i32.c +++ b/softfloat/f32_to_i32.c @@ -21,7 +21,6 @@ int_fast32_t f32_to_i32( float32_t a, int_fast8_t roundingMode, bool exact ) sign = signF32UI( uiA );
exp = expF32UI( uiA );
sig = fracF32UI( uiA );
- if ( ( exp == 0xFF ) && sig ) sign = 0;
if ( exp ) sig |= 0x00800000;
sig64 = (uint_fast64_t) sig<<32;
shiftCount = 0xAF - exp;
|