Safe Haskell | None |
---|---|
Language | GHC2021 |
Synopsis
- data CmmType
- b8 :: CmmType
- b16 :: CmmType
- b32 :: CmmType
- b64 :: CmmType
- b128 :: CmmType
- b256 :: CmmType
- b512 :: CmmType
- f32 :: CmmType
- f64 :: CmmType
- bWord :: Platform -> CmmType
- bHalfWord :: Platform -> CmmType
- gcWord :: Platform -> CmmType
- cInt :: Platform -> CmmType
- cmmBits :: Width -> CmmType
- cmmFloat :: Width -> CmmType
- typeWidth :: CmmType -> Width
- setCmmTypeWidth :: Width -> CmmType -> CmmType
- cmmEqType :: CmmType -> CmmType -> Bool
- cmmCompatType :: CmmType -> CmmType -> Bool
- isFloatType :: CmmType -> Bool
- isGcPtrType :: CmmType -> Bool
- isBitsType :: CmmType -> Bool
- isWordAny :: CmmType -> Bool
- isWord32 :: CmmType -> Bool
- isWord64 :: CmmType -> Bool
- isFloat64 :: CmmType -> Bool
- isFloat32 :: CmmType -> Bool
- data Width
- widthInBits :: Width -> Int
- widthInBytes :: Width -> Int
- widthInLog :: Width -> Int
- widthFromBytes :: Int -> Width
- wordWidth :: Platform -> Width
- halfWordWidth :: Platform -> Width
- cIntWidth :: Platform -> Width
- halfWordMask :: Platform -> Integer
- narrowU :: Width -> Integer -> Integer
- narrowS :: Width -> Integer -> Integer
- rEP_CostCentreStack_mem_alloc :: Platform -> CmmType
- rEP_CostCentreStack_scc_count :: Platform -> CmmType
- rEP_StgEntCounter_allocs :: Platform -> CmmType
- rEP_StgEntCounter_allocd :: Platform -> CmmType
- data ForeignHint
- = NoHint
- | AddrHint
- | SignedHint
- type Length = Int
- vec :: Length -> CmmType -> CmmType
- vec2 :: CmmType -> CmmType
- vec4 :: CmmType -> CmmType
- vec8 :: CmmType -> CmmType
- vec16 :: CmmType -> CmmType
- vec2f64 :: CmmType
- vec2b64 :: CmmType
- vec4f32 :: CmmType
- vec4b32 :: CmmType
- vec8b16 :: CmmType
- vec16b8 :: CmmType
- cmmVec :: Int -> CmmType -> CmmType
- vecLength :: CmmType -> Length
- vecElemType :: CmmType -> CmmType
- isVecType :: CmmType -> Bool
- type DoAlignSanitisation = Bool
Documentation
cmmCompatType :: CmmType -> CmmType -> Bool Source #
A weaker notion of equality of CmmType
s than cmmEqType
,
used (only) in Cmm Lint.
Why "weaker"? Because:
- we don't distinguish GcPtr vs NonGcPtr, because the the RTS files are not yet well-typed wrt pointers,
- for vectors, we only compare the widths, because in practice things like X86 xmm registers support different types of data (e.g. 4xf32, 2xf64, 2xu64 etc).
isFloatType :: CmmType -> Bool Source #
isGcPtrType :: CmmType -> Bool Source #
isBitsType :: CmmType -> Bool Source #
widthInBits :: Width -> Int Source #
A width in bits.
widthInBytes :: Width -> Int Source #
A width in bytes.
widthFromBytes (widthInBytes w) === w
widthInLog :: Width -> Int Source #
log_2 of the width in bytes, useful for generating shifts.
widthFromBytes :: Int -> Width Source #
- Partial* A width from the number of bytes.
halfWordWidth :: Platform -> Width Source #
The width of the current platform's half-word size.
halfWordMask :: Platform -> Integer Source #
A bit-mask for the lower half-word of current platform.
narrowU :: Width -> Integer -> Integer Source #
Narrow a signed or unsigned value to the given width. The result will
reside in [0, +2^width)
.
>>>
narrowU W8 256 == 256
>>>
narrowU W8 255 == 255
>>>
narrowU W8 128 == 128
>>>
narrowU W8 127 == 127
>>>
narrowU W8 0 == 0
>>>
narrowU W8 (-127) == 129
>>>
narrowU W8 (-128) == 128
>>>
narrowU W8 (-129) == 127
>>>
narrowU W8 (-255) == 1
>>>
narrowU W8 (-256) == 0
narrowS :: Width -> Integer -> Integer Source #
Narrow a signed value to the given width. The result will reside
in [-2^(width-1), +2^(width-1))
.
>>>
narrowS W8 256 == 0
>>>
narrowS W8 255 == -1
>>>
narrowS W8 128 == -128
>>>
narrowS W8 127 == 127
>>>
narrowS W8 0 == 0
>>>
narrowS W8 (-127) == -127
>>>
narrowS W8 (-128) == -128
>>>
narrowS W8 (-129) == 127
>>>
narrowS W8 (-255) == 1
>>>
narrowS W8 (-256) == 0
data ForeignHint Source #
Instances
Outputable ForeignHint Source # | |
Defined in GHC.Cmm.Type ppr :: ForeignHint -> SDoc Source # | |
Eq ForeignHint Source # | |
Defined in GHC.Cmm.Type (==) :: ForeignHint -> ForeignHint -> Bool # (/=) :: ForeignHint -> ForeignHint -> Bool # |
vecElemType :: CmmType -> CmmType Source #
type DoAlignSanitisation = Bool Source #
is -falignment-sanitisation
enabled?