High-level Cmm code and stack allocation

Herbert Valerio Riedel hvr at gnu.org
Sun Jan 5 00:27:18 UTC 2014


On 2014-01-05 at 00:26:52 +0100, Herbert Valerio Riedel wrote:

[...]

> So is this valid high-level Cmm code? What's the proper way to allocate
> Stack (and/or Heap) memory from high-level Cmm code?

PS: ...are function calls supposed to work as advertised in

    https://github.com/ghc/ghc/blob/master/compiler/cmm/CmmParse.y#L76 

?

I've tried using `(ret1,ret2) = call stg_fun (arg1,arg2);` in a Cmm
file, but I get a parser error on `call` with GHC HEAD; only when leave
out the return value assignement, i.e. when I use only `call stg_fun
(arg1,arg2);`, it gets parsed succesfully. Is this a bug in the
CmmParser?

Cheers,
  hvr


More information about the ghc-devs mailing list