Have you looked at some of the lowering code for other primops? What info are you missing?
On Friday, March 7, 2014, Johan Tibell <johan.tibell@gmail.com> wrote:
Hi,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 = doemitCallTo "stg_newArrayzh" res_r n -- HEREThe question is: how do I emit a call to stg_newArrayzh, which is defined in PrimOps.cmm?-- Johan