X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2FnativeGen%2FRegAlloc%2FLinear%2FPPC%2FFreeRegs.hs;h=3db5555bffa049e9868a56f3778099adad77b70f;hb=e21c922fcdd1dac193bd8ff5670787daa3c21a12;hp=aa6822c091885880b028dce63b4f3c49dd08aa2b;hpb=2d367f855c3556166d24cf538d5c34d0ff596a2f;p=ghc-hetmet.git diff --git a/compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs index aa6822c..3db5555 100644 --- a/compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs +++ b/compiler/nativeGen/RegAlloc/Linear/PPC/FreeRegs.hs @@ -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"