aboutsummaryrefslogtreecommitdiff
path: root/gcc/f/runtime/libF77/lbitshft.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/f/runtime/libF77/lbitshft.c')
-rw-r--r--gcc/f/runtime/libF77/lbitshft.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/f/runtime/libF77/lbitshft.c b/gcc/f/runtime/libF77/lbitshft.c
new file mode 100644
index 00000000000..81b0fdbeaba
--- /dev/null
+++ b/gcc/f/runtime/libF77/lbitshft.c
@@ -0,0 +1,11 @@
+#include "f2c.h"
+
+ integer
+#ifdef KR_headers
+lbit_shift(a, b) integer a; integer b;
+#else
+lbit_shift(integer a, integer b)
+#endif
+{
+ return b >= 0 ? a << b : (integer)((uinteger)a >> -b);
+ }