ghc-9.14.0.20251128: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.CmmToAsm.Format

Description

Formats on this architecture A Format is a combination of width and class

TODO: Signed vs unsigned?

TODO: This module is currently shared by all architectures because NCGMonad need to know about it to make a VReg. It would be better to have architecture specific formats, and do the overloading properly. eg SPARC doesn't care about FF80.

Synopsis

Documentation

data Format #

Constructors

II8 
II16 
II32 
II64 
FF32 
FF64 
VecFormat 

Fields

Bundled Patterns

pattern IntegerFormat :: Format 

Instances

Instances details
Outputable Format # 
Instance details

Defined in GHC.CmmToAsm.Format

Methods

ppr :: Format -> SDoc #

Eq Format # 
Instance details

Defined in GHC.CmmToAsm.Format

Ord Format # 
Instance details

Defined in GHC.CmmToAsm.Format

Show Format # 
Instance details

Defined in GHC.CmmToAsm.Format

intFormat :: Width -> Format #

Get the integer format of this width.

floatFormat :: Width -> Format #

Get the float format of this width.

isIntFormat :: Format -> Bool #

Check if a format represent an integer value.

isFloatFormat :: Format -> Bool #

Check if a format represents a floating point value.

isVecFormat :: Format -> Bool #

Check if a format represents a vector

cmmTypeFormat :: CmmType -> Format #

Convert a Cmm type to a Format.

formatToWidth :: Format -> Width #

Get the Width of a Format.

data VirtualRegWithFormat #

A typed virtual register: a virtual register, together with the specific format we are using it at.

Instances

Instances details
Outputable VirtualRegWithFormat # 
Instance details

Defined in GHC.CmmToAsm.Format

data RegWithFormat #

A typed register: a register, together with the specific format we are using it at.

Instances

Instances details
Uniquable RegWithFormat # 
Instance details

Defined in GHC.CmmToAsm.Format

Outputable RegWithFormat # 
Instance details

Defined in GHC.CmmToAsm.Format

Methods

ppr :: RegWithFormat -> SDoc #

Show RegWithFormat # 
Instance details

Defined in GHC.CmmToAsm.Format

takeVirtualRegs :: UniqSet RegWithFormat -> UniqSet VirtualReg #

Take all the virtual registers from this set.

takeRealRegs :: UniqSet RegWithFormat -> UniqSet RealReg #

Take all the real registers from this set.