[sim] integrated SoftFloat-3 with ISA sim; removed SoftFloat-2b
[riscv-isa-sim.git] / softfloat / 8086 / s_f64UIToCommonNaN.c
diff --git a/softfloat/8086/s_f64UIToCommonNaN.c b/softfloat/8086/s_f64UIToCommonNaN.c
new file mode 100755 (executable)
index 0000000..f933ded
--- /dev/null
@@ -0,0 +1,25 @@
+\r
+#include <stdint.h>\r
+#include "platform.h"\r
+#include "specialize.h"\r
+#include "softfloat.h"\r
+\r
+/*----------------------------------------------------------------------------\r
+| Returns the result of converting the double-precision floating-point NaN\r
+| `a' to the canonical NaN format.  If `a' is a signaling NaN, the invalid\r
+| exception is raised.\r
+*----------------------------------------------------------------------------*/\r
+struct commonNaN softfloat_f64UIToCommonNaN( uint_fast64_t uiA )\r
+{\r
+    struct commonNaN z;\r
+\r
+    if ( softfloat_isSigNaNF64UI( uiA ) ) {\r
+        softfloat_raiseFlags( softfloat_flag_invalid );\r
+    }\r
+    z.sign = uiA>>63;\r
+    z.v64 = uiA<<12;\r
+    z.v0 = 0;\r
+    return z;\r
+\r
+}\r
+\r