diff options
author | Andrew Waterman <waterman@eecs.berkeley.edu> | 2014-01-25 18:31:32 -0800 |
---|---|---|
committer | Andrew Waterman <waterman@eecs.berkeley.edu> | 2014-01-25 18:31:32 -0800 |
commit | 017f62ac55a9514d12d47cf608f7f5ca6c1d4973 (patch) | |
tree | b59791f1fc9322b5c60b75815c244e00a2f33596 /softfloat/s_commonNaNToF64UI.c | |
parent | 287a1f87ca850b3583c27a1f178aaee28e02f2df (diff) | |
download | spike-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_commonNaNToF64UI.c')
-rwxr-xr-x | softfloat/s_commonNaNToF64UI.c | 18 |
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 ); + +} + |