Safe Haskell | None |
---|

Bits and pieces on the bottom of the module dependency tree. Also import the required constants, so we know what we're using.

In the interests of cross-compilation, we want to free ourselves from the autoconf generated modules like main/Constants

- wordLength :: Int
- wordLengthInBits :: Int
- spillAreaLength :: Int
- spillSlotSize :: Int
- extraStackArgsHere :: Int
- fits13Bits :: Integral a => a -> Bool
- is32BitInteger :: Integer -> Bool
- largeOffsetError :: (Integral a, Show a) => a -> b

# Documentation

We need 8 bytes because our largest registers are 64 bit.

extraStackArgsHere :: IntSource

We (allegedly) put the first six C-call arguments in registers; where do we start putting the rest of them?

fits13Bits :: Integral a => a -> BoolSource

Check whether an offset is representable with 13 bits.

is32BitInteger :: Integer -> BoolSource

Check whether an integer will fit in 32 bits. A CmmInt is intended to be truncated to the appropriate number of bits, so here we truncate it to Int64. This is important because e.g. -1 as a CmmInt might be either -1 or 18446744073709551615.

largeOffsetError :: (Integral a, Show a) => a -> bSource

Sadness.