Update README
[riscv-isa-sim.git] / softfloat / f32_to_i32.c
index c80649a300536feddc1ad29b4c7a25396d80599a..c9f2cf9b392158746b77fb6993e13370eab8bc83 100644 (file)
@@ -2,10 +2,10 @@
 /*============================================================================
 
 This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a+, by John R. Hauser.
+Package, Release 3d, by John R. Hauser.
 
-Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
-California.  All rights reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
+University of California.  All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -76,9 +76,9 @@ int_fast32_t f32_to_i32( float32_t a, uint_fast8_t roundingMode, bool exact )
     *------------------------------------------------------------------------*/
     if ( exp ) sig |= 0x00800000;
     sig64 = (uint_fast64_t) sig<<32;
-    shiftDist = 0xAF - exp;
+    shiftDist = 0xAA - exp;
     if ( 0 < shiftDist ) sig64 = softfloat_shiftRightJam64( sig64, shiftDist );
-    return softfloat_roundPackToI32( sign, sig64, roundingMode, exact );
+    return softfloat_roundToI32( sign, sig64, roundingMode, exact );
 
 }