2 -- | Bits and pieces on the bottom of the module dependency tree.
3 -- Also import the required constants, so we know what we're using.
5 -- In the interests of cross-compilation, we want to free ourselves
6 -- from the autoconf generated modules like main/Constants
19 import qualified Constants
22 -- On 32 bit SPARC, pointers are 32 bits.
26 wordLengthInBits :: Int
30 -- Size of the available spill area
31 spillAreaLength :: Int
33 = Constants.rESERVED_C_STACK_BYTES
35 -- | We need 8 bytes because our largest registers are 64 bit.
40 {-# SPECIALIZE fits13Bits :: Int -> Bool, Integer -> Bool #-}
41 -- | Check whether an offset is representable with 13 bits.
42 fits13Bits :: Integral a => a -> Bool
43 fits13Bits x = x >= -4096 && x < 4096
47 largeOffsetError :: Integral a => a -> b
49 = panic ("ERROR: SPARC native-code generator cannot handle large offset ("
50 ++ show i ++ ");\nprobably because of large constant data structures;" ++
51 "\nworkaround: use -fvia-C on this module.\n")