ghc-7.8.3: The GHC API

Safe HaskellNone
LanguageHaskell98

SPARC.Base

Description

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

Synopsis

Documentation

spillSlotSize :: Int Source

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

extraStackArgsHere :: Int Source

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

fits13Bits :: Integral a => a -> Bool Source

Check whether an offset is representable with 13 bits.

is32BitInteger :: Integer -> Bool Source

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 -> b Source

Sadness.