diff options
| author | simonmar <unknown> | 2001-12-12 12:20:10 +0000 |
|---|---|---|
| committer | simonmar <unknown> | 2001-12-12 12:20:10 +0000 |
| commit | 23d366594eec3e60a86ea90e4edc42fd5f1d88ee (patch) | |
| tree | ecc9f4d4ce9dd35755767d1b63f7646dbe0a94e1 /ghc/compiler/nativeGen/MachMisc.lhs | |
| parent | e34cff9c046f4b5661d555603833dd2f85ac4e6d (diff) | |
| download | haskell-23d366594eec3e60a86ea90e4edc42fd5f1d88ee.tar.gz | |
[project @ 2001-12-12 12:19:11 by simonmar]
shiftery #ifdefs
Diffstat (limited to 'ghc/compiler/nativeGen/MachMisc.lhs')
| -rw-r--r-- | ghc/compiler/nativeGen/MachMisc.lhs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ghc/compiler/nativeGen/MachMisc.lhs b/ghc/compiler/nativeGen/MachMisc.lhs index 4aa230be7b..6c5e31717e 100644 --- a/ghc/compiler/nativeGen/MachMisc.lhs +++ b/ghc/compiler/nativeGen/MachMisc.lhs @@ -53,7 +53,7 @@ import PrimRep ( PrimRep(..) ) import Stix ( StixStmt(..), StixExpr(..), StixReg(..), CodeSegment, DestInfo(..) ) import Panic ( panic ) -import GlaExts ( word2Int#, int2Word#, shiftRL#, and#, (/=#) ) +import GlaExts import Outputable ( pprPanic, ppr, showSDoc ) import IOExts ( trace ) import Config ( cLeadingUnderscore ) @@ -176,7 +176,11 @@ exactLog2 x Just (toInteger (iBox (pow2 x#))) } where +#if __GLASGOW_HASKELL__ >= 503 + shiftr x y = uncheckedShiftRL# x y +#else shiftr x y = shiftRL# x y +#endif pow2 x# | x# ==# 1# = 0# | otherwise = 1# +# pow2 (w2i (i2w x# `shiftr` 1#)) |
