ghc-9.6.2: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Platform.Reg

Description

An architecture independent description of a register. This needs to stay architecture independent because it is used by NCGMonad and the register allocators, which are shared by all architectures.

Synopsis

Documentation

type RegNo = Int Source #

An identifier for a primitive real machine register.

data Reg Source #

A register, either virtual or real

Instances

Instances details
Show Reg Source # 
Instance details

Defined in GHC.Platform.Reg

Uniquable Reg Source # 
Instance details

Defined in GHC.Platform.Reg

Methods

getUnique :: Reg -> Unique Source #

Outputable Reg Source #

Print a reg in a generic manner If you want the architecture specific names, then use the pprReg function from the appropriate Ppr module.

Instance details

Defined in GHC.Platform.Reg

Methods

ppr :: Reg -> SDoc Source #

Eq Reg Source # 
Instance details

Defined in GHC.Platform.Reg

Methods

(==) :: Reg -> Reg -> Bool #

(/=) :: Reg -> Reg -> Bool #

Ord Reg Source # 
Instance details

Defined in GHC.Platform.Reg

Methods

compare :: Reg -> Reg -> Ordering #

(<) :: Reg -> Reg -> Bool #

(<=) :: Reg -> Reg -> Bool #

(>) :: Reg -> Reg -> Bool #

(>=) :: Reg -> Reg -> Bool #

max :: Reg -> Reg -> Reg #

min :: Reg -> Reg -> Reg #

newtype RealReg Source #

RealRegs are machine regs which are available for allocation, in the usual way. We know what class they are, because that's part of the processor's architecture.

Constructors

RealRegSingle RegNo 

Instances

Instances details
Show RealReg Source # 
Instance details

Defined in GHC.Platform.Reg

Uniquable RealReg Source # 
Instance details

Defined in GHC.Platform.Reg

Outputable RealReg Source # 
Instance details

Defined in GHC.Platform.Reg

Methods

ppr :: RealReg -> SDoc Source #

Eq RealReg Source # 
Instance details

Defined in GHC.Platform.Reg

Methods

(==) :: RealReg -> RealReg -> Bool #

(/=) :: RealReg -> RealReg -> Bool #

Ord RealReg Source # 
Instance details

Defined in GHC.Platform.Reg

liftPatchFnToRegReg :: (VirtualReg -> RealReg) -> Reg -> Reg Source #

The patch function supplied by the allocator maps VirtualReg to RealReg regs, but sometimes we want to apply it to plain old Reg.