X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FSPARC%2FRegs.hs;h=1fea9d61790e2cb3058bd9290e210149eff4e144;hb=f537dd87c4a07526e2b1fc1bd1c125d652833641;hp=8ad400f813e079abfea53dab8eeb5c5c58d2ba82;hpb=a2a67cd520b9841114d69a87a423dabcb3b4368e;p=ghc-hetmet.git diff --git a/compiler/nativeGen/SPARC/Regs.hs b/compiler/nativeGen/SPARC/Regs.hs index 8ad400f..1fea9d6 100644 --- a/compiler/nativeGen/SPARC/Regs.hs +++ b/compiler/nativeGen/SPARC/Regs.hs @@ -18,7 +18,6 @@ module SPARC.Regs ( -- allocatable allocatableRegs, - get_GlobalReg_reg_or_addr, -- args argRegs, @@ -38,9 +37,7 @@ import Reg import RegClass import Size -import Cmm -import PprCmm () -import CgUtils ( get_GlobalReg_addr ) +-- import PprCmm () import Unique import Outputable @@ -95,22 +92,21 @@ virtualRegSqueeze cls vr -> case vr of VirtualRegI{} -> _ILIT(1) VirtualRegHi{} -> _ILIT(1) - VirtualRegF{} -> _ILIT(0) - VirtualRegD{} -> _ILIT(0) + _other -> _ILIT(0) RcFloat -> case vr of - VirtualRegI{} -> _ILIT(0) - VirtualRegHi{} -> _ILIT(0) VirtualRegF{} -> _ILIT(1) VirtualRegD{} -> _ILIT(2) + _other -> _ILIT(0) RcDouble -> case vr of - VirtualRegI{} -> _ILIT(0) - VirtualRegHi{} -> _ILIT(0) VirtualRegF{} -> _ILIT(1) VirtualRegD{} -> _ILIT(1) + _other -> _ILIT(0) + + _other -> _ILIT(0) {-# INLINE realRegSqueeze #-} realRegSqueeze :: RegClass -> RealReg -> FastInt @@ -141,6 +137,7 @@ realRegSqueeze cls rr RealRegPair{} -> _ILIT(1) + _other -> _ILIT(0) -- | All the allocatable registers in the machine, -- including register pairs. @@ -214,21 +211,6 @@ allocatableRegs in filter isFree allRealRegs - --- We map STG registers onto appropriate CmmExprs. Either they map --- to real machine registers or stored as offsets from BaseReg. Given --- a GlobalReg, get_GlobalReg_reg_or_addr produces either the real --- register it is in, on this platform, or a CmmExpr denoting the --- address in the register table holding it. --- (See also get_GlobalReg_addr in CgUtils.) - -get_GlobalReg_reg_or_addr :: GlobalReg -> Either RealReg CmmExpr -get_GlobalReg_reg_or_addr mid - = case globalRegMaybe mid of - Just rr -> Left rr - Nothing -> Right (get_GlobalReg_addr mid) - - -- | The registers to place arguments for function calls, -- for some number of arguments. -- @@ -283,7 +265,7 @@ regDotColor reg = case classOfRealReg reg of RcInteger -> text "blue" RcFloat -> text "red" - RcDouble -> text "green" + _other -> text "green"