GHC.Cmm.Type
Documentation
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 #
Constructors
NoHint | |
AddrHint | |
SignedHint |
Instances
Outputable ForeignHint Source # | |
Defined in GHC.Cmm.Ppr.Decl Methods ppr :: ForeignHint -> SDoc Source # | |
Eq ForeignHint Source # | |
Defined in GHC.Cmm.Type |
vecElemType :: CmmType -> CmmType Source #
type DoAlignSanitisation = Bool Source #
is -falignment-sanitisation
enabled?