aboutsummaryrefslogtreecommitdiff
path: root/softfloat_riscv/s_commonNaNToF64UI.c
diff options
context:
space:
mode:
Diffstat (limited to 'softfloat_riscv/s_commonNaNToF64UI.c')
-rwxr-xr-xsoftfloat_riscv/s_commonNaNToF64UI.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/softfloat_riscv/s_commonNaNToF64UI.c b/softfloat_riscv/s_commonNaNToF64UI.c
new file mode 100755
index 0000000..da36c04
--- /dev/null
+++ b/softfloat_riscv/s_commonNaNToF64UI.c
@@ -0,0 +1,18 @@
+
+#include <stdint.h>
+#include "platform.h"
+#include "specialize.h"
+
+/*----------------------------------------------------------------------------
+| Returns the result of converting the canonical NaN `a' to the double-
+| precision floating-point format.
+*----------------------------------------------------------------------------*/
+
+uint_fast64_t softfloat_commonNaNToF64UI( struct commonNaN a )
+{
+
+ return
+ (uint_fast64_t) a.sign<<63 | UINT64_C( 0x7FFFFFFFFFFFFFFF );
+
+}
+