diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-03-12 17:38:04 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-03-12 17:38:04 -0700 |
commit | 6517fe26a2a0c89c3112f4a383c601572c71d64a (patch) | |
tree | d37eea7ae6f3e15eee94afb5c9c749a4cd800577 /softint | |
parent | a4ae7da6ef0c09c2616a0b82f7f569e4e134f75c (diff) | |
download | pk-6517fe26a2a0c89c3112f4a383c601572c71d64a.zip pk-6517fe26a2a0c89c3112f4a383c601572c71d64a.tar.gz pk-6517fe26a2a0c89c3112f4a383c601572c71d64a.tar.bz2 |
Update to new privileged spec
Diffstat (limited to 'softint')
-rw-r--r-- | softint/mul.c | 22 | ||||
-rw-r--r-- | softint/softint.ac | 1 | ||||
-rwxr-xr-x | softint/softint.h | 23 | ||||
-rw-r--r-- | softint/softint.mk.in | 12 | ||||
-rwxr-xr-x | softint/udivrem.c | 29 |
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;
-}
-
|