summaryrefslogtreecommitdiff
path: root/libraries/integer-gmp/cbits/longlong.c
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2015-03-29 19:02:08 +0200
committerHerbert Valerio Riedel <hvr@gnu.org>2015-03-31 10:59:36 +0200
commit995e8c1c8692b60c907c7d2ccea179d52ca8e69e (patch)
tree1314ec36672d72b33a99b33e017316c0b8585625 /libraries/integer-gmp/cbits/longlong.c
parent1f69f37f34c6f15fd900c2c1cce3ce896168dde9 (diff)
downloadhaskell-995e8c1c8692b60c907c7d2ccea179d52ca8e69e.tar.gz
Drop old integer-gmp-0.5 from GHC source tree
This completes what c774b28f76ee4c220f7c1c9fd81585e0e3af0e8a (#9281) started. `integer-gmp-1.0` was added as an additional `libraries/integer-gmp2` folder while retaining the ability to configure GHC w/ the old `integer-gmp-0.5` to have a way back, and or the ability to easily switch between old/new `integer-gmp` for benchmark/debugging purposes. This commit removes the old `libraries/integer-gmp` folder and moves `libraries/integer-gmp2` into its place, while removing any mentions of "gmp2" as well as the to support two different `integer-gmp` packages in GHC's source-tree. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D769
Diffstat (limited to 'libraries/integer-gmp/cbits/longlong.c')
-rw-r--r--libraries/integer-gmp/cbits/longlong.c66
1 files changed, 0 insertions, 66 deletions
diff --git a/libraries/integer-gmp/cbits/longlong.c b/libraries/integer-gmp/cbits/longlong.c
deleted file mode 100644
index 1bf101819c..0000000000
--- a/libraries/integer-gmp/cbits/longlong.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -----------------------------------------------------------------------------
- * $Id: longlong.c,v 1.4 2002/12/13 14:23:42 simonmar Exp $
- *
- * (c) The GHC Team, 1998-1999
- *
- * Primitive operations over (64-bit) long longs
- * (only used on 32-bit platforms.)
- *
- * ---------------------------------------------------------------------------*/
-
-
-/*
-Primitive Integer conversions to/from HsInt64 and HsWord64s.
-N.B. These are not primops!
-
-Instead of going the normal (boring) route of making the list
-of primitive operations even longer to cope with operations
-over 64-bit entities, we implement them instead 'out-of-line'.
-
-The primitive ops get their own routine (in C) that implements
-the operation, requiring the caller to _ccall_ out. This has
-performance implications of course, but we currently don't
-expect intensive use of either Int64 or Word64 types.
-*/
-
-#include "Rts.h"
-
-#if WORD_SIZE_IN_BITS < 64
-
-HsWord64 hs_integerToWord64 (HsInt sa, StgByteArray /* Really: mp_limb_t* */ da)
-{
- mp_limb_t* d;
- HsInt s;
- HsWord64 res;
- d = (mp_limb_t *)da;
- s = sa;
- switch (s) {
- case 0: res = 0; break;
- case 1: res = d[0]; break;
- case -1: res = -(HsWord64)d[0]; break;
- default:
- res = (HsWord64)d[0] + ((HsWord64)d[1] << (BITS_IN (mp_limb_t)));
- if (s < 0) res = -res;
- }
- return res;
-}
-
-HsInt64 hs_integerToInt64 (HsInt sa, StgByteArray /* Really: mp_limb_t* */ da)
-{
- mp_limb_t* d;
- HsInt s;
- HsInt64 res;
- d = (mp_limb_t *)da;
- s = (sa);
- switch (s) {
- case 0: res = 0; break;
- case 1: res = d[0]; break;
- case -1: res = -(HsInt64)d[0]; break;
- default:
- res = (HsInt64)d[0] + ((HsWord64)d[1] << (BITS_IN (mp_limb_t)));
- if (s < 0) res = -res;
- }
- return res;
-}
-
-#endif /* WORD_SIZE_IN_BITS < 64 */