diff options
author | Ben.Lippmeier@anu.edu.au <unknown> | 2009-01-20 07:51:00 +0000 |
---|---|---|
committer | Ben.Lippmeier@anu.edu.au <unknown> | 2009-01-20 07:51:00 +0000 |
commit | 27992bf89c008991fd6450b2b5bb224eda1f068a (patch) | |
tree | 02edf6cc191472f29e3206c98b27678427cd22a9 | |
parent | 240a8f698e7aa7be84fb68e8aa63ed68389e74de (diff) | |
download | haskell-27992bf89c008991fd6450b2b5bb224eda1f068a.tar.gz |
SPARC NCG: Fix warnings
-rw-r--r-- | compiler/nativeGen/MachCodeGen.hs | 4 | ||||
-rw-r--r-- | compiler/nativeGen/RegAllocLinear.hs | 17 |
2 files changed, 11 insertions, 10 deletions
diff --git a/compiler/nativeGen/MachCodeGen.hs b/compiler/nativeGen/MachCodeGen.hs index e90b40cd2c..325a4e8bf4 100644 --- a/compiler/nativeGen/MachCodeGen.hs +++ b/compiler/nativeGen/MachCodeGen.hs @@ -3667,6 +3667,10 @@ genCCall target dest_regs argsAndHints = do | not $ isFloatType rep , W32 <- width = unitOL $ mkRegRegMoveInstr (RealReg $ oReg 0) r_dest + + | not $ isFloatType rep + , W64 <- width + = unitOL $ mkRegRegMoveInstr (RealReg $ oReg 0) r_dest in result diff --git a/compiler/nativeGen/RegAllocLinear.hs b/compiler/nativeGen/RegAllocLinear.hs index 5e2529979d..0a0162f1bc 100644 --- a/compiler/nativeGen/RegAllocLinear.hs +++ b/compiler/nativeGen/RegAllocLinear.hs @@ -94,7 +94,6 @@ import MachInstrs import RegAllocInfo import RegLiveness import Cmm hiding (RegSet) -import PprMach import Digraph import Unique ( Uniquable(getUnique), Unique ) @@ -104,7 +103,6 @@ import UniqSupply import Outputable import State import FastString -import MonadUtils import Data.Maybe import Data.List @@ -112,8 +110,6 @@ import Control.Monad import Data.Word import Data.Bits -import Debug.Trace - #include "../includes/MachRegs.h" -- ----------------------------------------------------------------------------- @@ -206,7 +202,7 @@ initFreeRegs :: FreeRegs initFreeRegs = regs where - freeDouble = getFreeRegs RcDouble regs +-- freeDouble = getFreeRegs RcDouble regs regs = foldr releaseReg noFreeRegs allocable allocable = allocatableRegs \\ doublePairs doublePairs = [43, 45, 47, 49, 51, 53] @@ -223,15 +219,16 @@ getFreeRegs cls (FreeRegs g f d) go _ 0 _ = [] go x m i | x .&. m /= 0 = i : (go x (m `shiftL` 1) $! i+1) | otherwise = go x (m `shiftL` 1) $! i+1 - +{- showFreeRegs :: FreeRegs -> String showFreeRegs regs = "FreeRegs\n" ++ " integer: " ++ (show $ getFreeRegs RcInteger regs) ++ "\n" ++ " float: " ++ (show $ getFreeRegs RcFloat regs) ++ "\n" ++ " double: " ++ (show $ getFreeRegs RcDouble regs) ++ "\n" +-} - +{- -- | Check whether a reg is free regIsFree :: RegNo -> FreeRegs -> Bool regIsFree r (FreeRegs g f d) @@ -251,7 +248,7 @@ regIsFree r (FreeRegs g f d) | otherwise , mask <- 1 `shiftL` (fromIntegral r - 32) = f .&. mask /= 0 - +-} -- | Grab a register. grabReg :: RegNo -> FreeRegs -> FreeRegs @@ -316,7 +313,7 @@ releaseReg r regs@(FreeRegs g f d) -- | Allocate a register in the map. allocateReg :: RegNo -> FreeRegs -> FreeRegs -allocateReg r regs@(FreeRegs g f d) +allocateReg r regs -- (FreeRegs g f d) -- if the reg isn't actually free then we're in trouble {- | not $ regIsFree r regs @@ -820,7 +817,7 @@ allocateRegsAndSpill reading keep spills alloc (r:rs) = do case getFreeRegs (regClass r) freeregs of -- case (2): we have a free register - freeClass@(my_reg:_) -> {- pprTrace "alloc" (ppr r <+> ppr my_reg <+> ppr freeClass) $ -} + my_reg:_ -> {- pprTrace "alloc" (ppr r <+> ppr my_reg <+> ppr freeClass) $ -} do spills' <- loadTemp reading r loc my_reg spills let new_loc |