ghc-7.7.20130829: The GHC API

Safe HaskellNone

CmmNode

Synopsis

Documentation

data Convention Source

A convention maps a list of values (function arguments or return values) to registers or stack locations.

Constructors

NativeDirectCall

top-level Haskell functions use NativeDirectCall, which maps arguments to registers starting with R2, according to how many registers are available on the platform. This convention ignores R1, because for a top-level function call the function closure is implicit, and doesn't need to be passed.

NativeNodeCall

non-top-level Haskell functions, which pass the address of the function closure in R1 (regardless of whether R1 is a real register or not), and the rest of the arguments in registers or on the stack.

NativeReturn

a native return. The convention for returns depends on how many values are returned: for just one value returned, the appropriate register is used (R1, F1, etc.). regardless of whether it is a real register or not. For multiple values returned, they are mapped to registers or the stack.

Slow

Slow entry points: all args pushed on the stack

GC

Entry to the garbage collector: uses the node reg! (TODO: I don't think we need this --SDM)

foldExp :: (CmmExpr -> z -> z) -> CmmNode e x -> z -> zSource

foldExpDeep :: (CmmExpr -> z -> z) -> CmmNode e x -> z -> zSource

wrapRecExpf :: (CmmExpr -> z -> z) -> CmmExpr -> z -> zSource