From: sof Date: Sat, 15 Aug 1998 18:02:17 +0000 (+0000) Subject: [project @ 1998-08-15 18:02:17 by sof] X-Git-Tag: Approx_2487_patches~330 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c8fce555ec943e88c3da871ddc8f63038ea239c7;p=ghc-hetmet.git [project @ 1998-08-15 18:02:17 by sof] Another place where shiftRA# was used. --- diff --git a/ghc/compiler/nativeGen/MachMisc.lhs b/ghc/compiler/nativeGen/MachMisc.lhs index 838c335..7debcc1 100644 --- a/ghc/compiler/nativeGen/MachMisc.lhs +++ b/ghc/compiler/nativeGen/MachMisc.lhs @@ -59,7 +59,7 @@ import Stix ( StixTree(..), StixReg(..), sStLitLbl, ) import Util ( panic ) import Char ( isDigit ) -import GlaExts ( word2Int#, int2Word#, shiftRA#, and#, (/=#) ) +import GlaExts ( word2Int#, int2Word#, shiftRL#, and#, (/=#) ) \end{code} \begin{code} @@ -294,7 +294,6 @@ extensions. Tough. \begin{code} w2i x = word2Int# x i2w x = int2Word# x -i2w_s x = (x::Int#) exactLog2 :: Integer -> Maybe Integer exactLog2 x @@ -308,10 +307,10 @@ exactLog2 x Just (toInteger (I# (pow2 x#))) } where - shiftr x y = shiftRA# x y + shiftr x y = shiftRL# x y pow2 x# | x# ==# 1# = 0# - | otherwise = 1# +# pow2 (w2i (i2w x# `shiftr` i2w_s 1#)) + | otherwise = 1# +# pow2 (w2i (i2w x# `shiftr` 1#)) \end{code} % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -