aboutsummaryrefslogtreecommitdiff
path: root/softfloat/s_propagateNaNF32UI.c
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@eecs.berkeley.edu>2014-01-25 18:31:32 -0800
committerAndrew Waterman <waterman@eecs.berkeley.edu>2014-01-25 18:31:32 -0800
commit017f62ac55a9514d12d47cf608f7f5ca6c1d4973 (patch)
treeb59791f1fc9322b5c60b75815c244e00a2f33596 /softfloat/s_propagateNaNF32UI.c
parent287a1f87ca850b3583c27a1f178aaee28e02f2df (diff)
downloadspike-017f62ac55a9514d12d47cf608f7f5ca6c1d4973.zip
spike-017f62ac55a9514d12d47cf608f7f5ca6c1d4973.tar.gz
spike-017f62ac55a9514d12d47cf608f7f5ca6c1d4973.tar.bz2
Merge softfloat_riscv into softfloat
They really aren't independent libraries.
Diffstat (limited to 'softfloat/s_propagateNaNF32UI.c')
-rwxr-xr-xsoftfloat/s_propagateNaNF32UI.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/softfloat/s_propagateNaNF32UI.c b/softfloat/s_propagateNaNF32UI.c
new file mode 100755
index 0000000..d8738d1
--- /dev/null
+++ b/softfloat/s_propagateNaNF32UI.c
@@ -0,0 +1,25 @@
+
+/*** UPDATE COMMENTS. ***/
+
+#include <stdbool.h>
+#include <stdint.h>
+#include "platform.h"
+#include "internals.h"
+#include "specialize.h"
+#include "softfloat.h"
+
+/*----------------------------------------------------------------------------
+| Takes two single-precision floating-point values `a' and `b', one of which
+| is a NaN, and returns the appropriate NaN result. If either `a' or `b' is a
+| signaling NaN, the invalid exception is raised.
+*----------------------------------------------------------------------------*/
+
+uint_fast32_t
+ softfloat_propagateNaNF32UI( uint_fast32_t uiA, uint_fast32_t uiB )
+{
+ if ( softfloat_isSigNaNF32UI( uiA ) | softfloat_isSigNaNF32UI( uiB ) ) {
+ softfloat_raiseFlags( softfloat_flag_invalid );
+ }
+ return defaultNaNF32UI;
+}
+