High-level Cmm code and stack allocation
Herbert Valerio Riedel
hvr at gnu.org
Tue Jan 7 16:14:56 UTC 2014
Hello Simon,
On 2014-01-07 at 17:04:52 +0100, Simon Marlow wrote:
[...]
> Yes, this is technically wrong but luckily works.
...but only as long as the code-generator doesn't try to push something
on the stack, like e.g. when performing native 'call's which need to
push the return-location on the stack...?
> I'd very much like
> to have a better solution, preferably one that doesn't add any extra
> overhead.
I see... I've noticed there's a 'push() { ... }' construct that allows
to push items on the stack; couldn't we have generalized version of
that, taking a size-argument, declaring that specified amount of
stack-space is user-allocated/controlled within the '{ ... }' scope?
Greetings,
hvr
More information about the ghc-devs
mailing list