aboutsummaryrefslogtreecommitdiff
path: root/softint
diff options
context:
space:
mode:
Diffstat (limited to 'softint')
-rw-r--r--softint/mul.c22
-rw-r--r--softint/softint.ac1
-rwxr-xr-xsoftint/softint.h23
-rw-r--r--softint/softint.mk.in12
-rwxr-xr-xsoftint/udivrem.c29
5 files changed, 0 insertions, 87 deletions
diff --git a/softint/mul.c b/softint/mul.c
deleted file mode 100644
index 1907dba..0000000
--- a/softint/mul.c
+++ /dev/null
@@ -1,22 +0,0 @@
-
-#include <stdint.h>
-
-long softint_mul( long x, long y )
-{
-
- int i;
- long result = 0;
-
- for (i = 0; i < (sizeof(long) << 3); i++) {
- if ((x & 0x1) == 1)
- result = result + y;
-
- x = x >> 1;
- y = y << 1;
- }
-
- return result;
-
-}
-
-
diff --git a/softint/softint.ac b/softint/softint.ac
deleted file mode 100644
index 8b13789..0000000
--- a/softint/softint.ac
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/softint/softint.h b/softint/softint.h
deleted file mode 100755
index 69ca31a..0000000
--- a/softint/softint.h
+++ /dev/null
@@ -1,23 +0,0 @@
-
-#ifndef softint_h
-#define softint_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/*----------------------------------------------------------------------------
-| Integer Operations.
-*----------------------------------------------------------------------------*/
-
-long softint_mul( long, long );
-long softint_udivrem( long, long, int );
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/softint/softint.mk.in b/softint/softint.mk.in
deleted file mode 100644
index a2b632f..0000000
--- a/softint/softint.mk.in
+++ /dev/null
@@ -1,12 +0,0 @@
-softint_subproject_deps =
-
-softint_hdrs = \
- softint.h \
-
-softint_c_srcs = \
- udivrem.c \
- mul.c \
-
-softint_test_srcs =
-
-softint_install_prog_srcs =
diff --git a/softint/udivrem.c b/softint/udivrem.c
deleted file mode 100755
index 906c665..0000000
--- a/softint/udivrem.c
+++ /dev/null
@@ -1,29 +0,0 @@
-
-#include <stdint.h>
-
-
-unsigned long
-softint_udivrem(unsigned long num, unsigned long den, int modwanted)
-{
- unsigned long bit = 1;
- unsigned long res = 0;
-
- while (den < num && bit && ((signed long) den >= 0))
- {
- den <<=1;
- bit <<=1;
- }
- while (bit)
- {
- if (num >= den)
- {
- num -= den;
- res |= bit;
- }
- bit >>=1;
- den >>=1;
- }
- if (modwanted) return num;
- return res;
-}
-