-- allocatable
allocatableRegs,
- get_GlobalReg_reg_or_addr,
-- args
argRegs,
import RegClass
import Size
-import Cmm
-import PprCmm ()
-import CgUtils ( get_GlobalReg_addr )
+-- import PprCmm ()
import Unique
import Outputable
prepared for any eventuality.
The whole fp-register pairing thing on sparcs is a huge nuisance. See
- fptools/ghc/includes/MachRegs.h for a description of what's going on
+ includes/stg/MachRegs.h for a description of what's going on
here.
-}
-> 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
RealRegPair{} -> _ILIT(1)
+ _other -> _ILIT(0)
-- | All the allocatable registers in the machine,
-- including register pairs.
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.
--
= case classOfRealReg reg of
RcInteger -> text "blue"
RcFloat -> text "red"
- RcDouble -> text "green"
+ _other -> text "green"
-- Hard coded freeReg / globalRegMaybe -----------------------------------------
-- This isn't being used at the moment because we're generating
--- these functions from the information in includes/MachRegs.hs via RegPlate.hs
+-- these functions from the information in
+-- includes/stg/MachRegs.hs via RegPlate.hs
-- | Check whether a machine register is free for allocation.
--- This needs to match the info in includes/MachRegs.h otherwise modules
--- compiled with the NCG won't be compatible with via-C ones.
+-- This needs to match the info in includes/stg/MachRegs.h
+-- otherwise modules compiled with the NCG won't be compatible
+-- with via-C ones.
--
{-
freeReg :: RegNo -> FastBool