Safe Haskell | None |
---|---|
Language | GHC2021 |
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
- data Format where
- data ScalarFormat
- intFormat :: Width -> Format
- floatFormat :: Width -> Format
- isIntFormat :: Format -> Bool
- isIntScalarFormat :: ScalarFormat -> Bool
- intScalarFormat :: Width -> ScalarFormat
- isFloatFormat :: Format -> Bool
- vecFormat :: CmmType -> Format
- isVecFormat :: Format -> Bool
- cmmTypeFormat :: CmmType -> Format
- formatToWidth :: Format -> Width
- scalarWidth :: ScalarFormat -> Width
- formatInBytes :: Format -> Int
- isFloatScalarFormat :: ScalarFormat -> Bool
- isFloatOrFloatVecFormat :: Format -> Bool
- floatScalarFormat :: Width -> ScalarFormat
- scalarFormatFormat :: ScalarFormat -> Format
- data VirtualRegWithFormat = VirtualRegWithFormat {}
- data RegWithFormat = RegWithFormat {}
- takeVirtualRegs :: UniqSet RegWithFormat -> UniqSet VirtualReg
- takeRealRegs :: UniqSet RegWithFormat -> UniqSet RealReg
Documentation
II8 | |
II16 | |
II32 | |
II64 | |
FF32 | |
FF64 | |
VecFormat | |
|
pattern IntegerFormat :: Format |
data ScalarFormat Source #
Instances
Show ScalarFormat Source # | |
Defined in GHC.CmmToAsm.Format showsPrec :: Int -> ScalarFormat -> ShowS # show :: ScalarFormat -> String # showList :: [ScalarFormat] -> ShowS # | |
Eq ScalarFormat Source # | |
Defined in GHC.CmmToAsm.Format (==) :: ScalarFormat -> ScalarFormat -> Bool # (/=) :: ScalarFormat -> ScalarFormat -> Bool # | |
Ord ScalarFormat Source # | |
Defined in GHC.CmmToAsm.Format compare :: ScalarFormat -> ScalarFormat -> Ordering # (<) :: ScalarFormat -> ScalarFormat -> Bool # (<=) :: ScalarFormat -> ScalarFormat -> Bool # (>) :: ScalarFormat -> ScalarFormat -> Bool # (>=) :: ScalarFormat -> ScalarFormat -> Bool # max :: ScalarFormat -> ScalarFormat -> ScalarFormat # min :: ScalarFormat -> ScalarFormat -> ScalarFormat # |
floatFormat :: Width -> Format Source #
Get the float format of this width.
isIntFormat :: Format -> Bool Source #
Check if a format represent an integer value.
isIntScalarFormat :: ScalarFormat -> Bool Source #
intScalarFormat :: Width -> ScalarFormat Source #
isFloatFormat :: Format -> Bool Source #
Check if a format represents a floating point value.
isVecFormat :: Format -> Bool Source #
Check if a format represents a vector
cmmTypeFormat :: CmmType -> Format Source #
Convert a Cmm type to a Format.
formatToWidth :: Format -> Width Source #
Get the Width of a Format.
scalarWidth :: ScalarFormat -> Width Source #
formatInBytes :: Format -> Int Source #
isFloatOrFloatVecFormat :: Format -> Bool Source #
data VirtualRegWithFormat Source #
A typed virtual register: a virtual register, together with the specific format we are using it at.
data RegWithFormat Source #
A typed register: a register, together with the specific format we are using it at.
Instances
Uniquable RegWithFormat Source # | |
Defined in GHC.CmmToAsm.Format getUnique :: RegWithFormat -> Unique Source # | |
Outputable RegWithFormat Source # | |
Defined in GHC.CmmToAsm.Format ppr :: RegWithFormat -> SDoc Source # | |
Show RegWithFormat Source # | |
Defined in GHC.CmmToAsm.Format showsPrec :: Int -> RegWithFormat -> ShowS # show :: RegWithFormat -> String # showList :: [RegWithFormat] -> ShowS # |
takeVirtualRegs :: UniqSet RegWithFormat -> UniqSet VirtualReg Source #
Take all the virtual registers from this set.
takeRealRegs :: UniqSet RegWithFormat -> UniqSet RealReg Source #
Take all the real registers from this set.