aboutsummaryrefslogtreecommitdiff
path: root/softfloat/s_commonNaNToF64UI.c
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2015-03-12 17:38:04 -0700
committerAndrew Waterman <waterman@cs.berkeley.edu>2015-03-12 17:38:04 -0700
commit6517fe26a2a0c89c3112f4a383c601572c71d64a (patch)
treed37eea7ae6f3e15eee94afb5c9c749a4cd800577 /softfloat/s_commonNaNToF64UI.c
parenta4ae7da6ef0c09c2616a0b82f7f569e4e134f75c (diff)
downloadriscv-pk-6517fe26a2a0c89c3112f4a383c601572c71d64a.zip
riscv-pk-6517fe26a2a0c89c3112f4a383c601572c71d64a.tar.gz
riscv-pk-6517fe26a2a0c89c3112f4a383c601572c71d64a.tar.bz2
Update to new privileged spec
Diffstat (limited to 'softfloat/s_commonNaNToF64UI.c')
-rwxr-xr-xsoftfloat/s_commonNaNToF64UI.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/softfloat/s_commonNaNToF64UI.c b/softfloat/s_commonNaNToF64UI.c
new file mode 100755
index 0000000..da36c04
--- /dev/null
+++ b/softfloat/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 );
+
+}
+