ghc-8.8.4: The GHC API
Safe HaskellNone
LanguageHaskell2010

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
Eq Reg # 
Instance details

Defined in Reg

Methods

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

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

Ord Reg # 
Instance details

Defined in 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 #

Outputable Reg #

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 Reg

Methods

ppr :: Reg -> SDoc Source #

pprPrec :: Rational -> Reg -> SDoc Source #

Uniquable Reg # 
Instance details

Defined in Reg

Methods

getUnique :: Reg -> Unique Source #

data VirtualReg Source #

Instances

Instances details
Eq VirtualReg # 
Instance details

Defined in Reg

Ord VirtualReg # 
Instance details

Defined in Reg

Show VirtualReg # 
Instance details

Defined in Reg

Outputable VirtualReg # 
Instance details

Defined in Reg

Uniquable VirtualReg # 
Instance details

Defined in Reg

data 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.

RealRegPairs are pairs of real registers that are allocated together to hold a larger value, such as with Double regs on SPARC.

Instances

Instances details
Eq RealReg # 
Instance details

Defined in Reg

Methods

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

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

Ord RealReg # 
Instance details

Defined in Reg

Show RealReg # 
Instance details

Defined in Reg

Outputable RealReg # 
Instance details

Defined in Reg

Uniquable RealReg # 
Instance details

Defined in 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.