Emitting calls to functions defined in PrimOps.cmm from the code gen
johan.tibell at gmail.com
Fri Mar 7 07:24:55 UTC 2014
I'm trying to make allocation of arrays of small, statically-known size
inline. For large or unknown size I just want to call the existing
stg_newArrayzh function. In code:
doNewArrayOp :: DynFlags -> CmmFormal -> CmmExpr -> FCode ()
doNewArrayOp dflags res_r (CmmLit (CmmInt n _)) | n <= inlineAllocLimit = do
-- Do everything inline.
doNewArrayOp dflags res_r n = do
emitCallTo "stg_newArrayzh" res_r n -- HERE
The question is: how do I emit a call to stg_newArrayzh, which is defined
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ghc-devs