SPARC.Base

ghc-8.2.2: The GHC API

Safe Haskell | None
Language | Haskell2010

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

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

# Documentation

wordLength :: Int Source #

wordLengthInBits :: Int Source #

spillAreaLength :: DynFlags -> Int Source #

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 :: Show a => a -> b Source #

Sadness.