diff options
author | Ian Lynagh <igloo@earth.li> | 2009-06-15 20:17:07 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-06-15 20:17:07 +0000 |
commit | d8cc29c2c48cbbe14385e8df93c8be34e38832c8 (patch) | |
tree | c5017f0d7e442e4b98c96959d65dc7836a965120 | |
parent | 0c829cae72bbffd0b15f14d24355b66ea560942e (diff) | |
download | haskell-d8cc29c2c48cbbe14385e8df93c8be34e38832c8.tar.gz |
Remove the Integer functions; they're now in integer-gmp instead
-rw-r--r-- | libraries/ghc-prim/GHC/IntWord64.hs | 2 | ||||
-rw-r--r-- | libraries/ghc-prim/cbits/longlong.c | 38 |
2 files changed, 0 insertions, 40 deletions
diff --git a/libraries/ghc-prim/GHC/IntWord64.hs b/libraries/ghc-prim/GHC/IntWord64.hs index 1facda4d36..5260867a98 100644 --- a/libraries/ghc-prim/GHC/IntWord64.hs +++ b/libraries/ghc-prim/GHC/IntWord64.hs @@ -62,8 +62,6 @@ foreign import ccall unsafe "hs_uncheckedIShiftL64" uncheckedIShiftL64# :: Int foreign import ccall unsafe "hs_uncheckedIShiftRA64" uncheckedIShiftRA64# :: Int64# -> Int# -> Int64# foreign import ccall unsafe "hs_uncheckedIShiftRL64" uncheckedIShiftRL64# :: Int64# -> Int# -> Int64# -foreign import ccall unsafe "hs_integerToWord64" integerToWord64# :: Int# -> ByteArray# -> Word64# -foreign import ccall unsafe "hs_integerToInt64" integerToInt64# :: Int# -> ByteArray# -> Int64# foreign import ccall unsafe "hs_int64ToWord64" int64ToWord64# :: Int64# -> Word64# foreign import ccall unsafe "hs_word64ToInt64" word64ToInt64# :: Word64# -> Int64# foreign import ccall unsafe "hs_intToInt64" intToInt64# :: Int# -> Int64# diff --git a/libraries/ghc-prim/cbits/longlong.c b/libraries/ghc-prim/cbits/longlong.c index c8147733d3..21c9adb0c3 100644 --- a/libraries/ghc-prim/cbits/longlong.c +++ b/libraries/ghc-prim/cbits/longlong.c @@ -79,8 +79,6 @@ HsInt64 hs_uncheckedIShiftRL64 (HsInt64 a, HsInt b) {return (HsInt64) ((HsWord64) a >> b);} /* Casting between longs and longer longs. - (the primops that cast from long longs to Integers - expressed as macros, since these may cause some heap allocation). */ HsInt64 hs_intToInt64 (HsInt i) {return (HsInt64) i;} @@ -90,40 +88,4 @@ HsWord64 hs_wordToWord64 (HsWord w) {return (HsWord64) w;} HsWord hs_word64ToWord (HsWord64 w) {return (HsWord) w;} HsInt64 hs_word64ToInt64 (HsWord64 w) {return (HsInt64) w;} -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 /* SUPPORT_LONG_LONGS */ |