aboutsummaryrefslogtreecommitdiff
path: root/softfloat/s_shift64RightJam.c
diff options
context:
space:
mode:
Diffstat (limited to 'softfloat/s_shift64RightJam.c')
-rwxr-xr-xsoftfloat/s_shift64RightJam.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/softfloat/s_shift64RightJam.c b/softfloat/s_shift64RightJam.c
new file mode 100755
index 0000000..ebebb61
--- /dev/null
+++ b/softfloat/s_shift64RightJam.c
@@ -0,0 +1,15 @@
+
+#include <stdint.h>
+#include "platform.h"
+#include "primitives.h"
+
+uint64_t softfloat_shift64RightJam( uint64_t a, unsigned int count )
+{
+
+ return
+ ( count < 64 )
+ ? a>>count | ( (uint64_t) ( a<<( ( - count ) & 63 ) ) != 0 )
+ : ( a != 0 );
+
+}
+