fix haddock submodule pointer
[ghc-hetmet.git] / compiler / nativeGen / RegAlloc / Linear / PPC / FreeRegs.hs
index 4310c5e..3db5555 100644 (file)
@@ -11,7 +11,7 @@ import Outputable
 
 import Data.Word
 import Data.Bits
-import Data.List
+-- import Data.List
 
 -- The PowerPC has 32 integer and 32 floating point registers.
 -- This is 32bit PowerPC, so Word64 is inefficient - two Word32s are much
@@ -32,8 +32,8 @@ noFreeRegs = FreeRegs 0 0
 
 releaseReg :: RealReg -> FreeRegs -> FreeRegs
 releaseReg (RealRegSingle r) (FreeRegs g f)
-    | r > 31    = FreeRegs g (f .|. (1 `shiftL` (fromIntegral r - 32)))
-    | otherwise = FreeRegs (g .|. (1 `shiftL` fromIntegral r)) f
+    | r > 31    = FreeRegs g (f .|. (1 `shiftL` (r - 32)))
+    | otherwise = FreeRegs (g .|. (1 `shiftL` r)) f
 
 releaseReg _ _
        = panic "RegAlloc.Linear.PPC.releaseReg: bad reg"
@@ -53,8 +53,8 @@ getFreeRegs cls (FreeRegs g f)
 
 allocateReg :: RealReg -> FreeRegs -> FreeRegs
 allocateReg (RealRegSingle r) (FreeRegs g f) 
-    | r > 31    = FreeRegs g (f .&. complement (1 `shiftL` (fromIntegral r - 32)))
-    | otherwise = FreeRegs (g .&. complement (1 `shiftL` fromIntegral r)) f
+    | r > 31    = FreeRegs g (f .&. complement (1 `shiftL` (r - 32)))
+    | otherwise = FreeRegs (g .&. complement (1 `shiftL` r)) f
 
 allocateReg _ _
        = panic "RegAlloc.Linear.PPC.allocateReg: bad reg"