From 627b4f16433739136dc9f51a7dc9db93ce0384a1 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 22 Jan 2016 17:19:23 -0800 Subject: allocate __stack_pointer completely --- src/s2wasm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/s2wasm.h b/src/s2wasm.h index 46cf972c8..8b34d6b03 100644 --- a/src/s2wasm.h +++ b/src/s2wasm.h @@ -343,7 +343,9 @@ private: } void prepare() { - staticAddresses["__stack_pointer"] = 0; // XXX HACK for now + assert(nextStatic == globalBase); // we are the first allocation + staticAddresses["__stack_pointer"] = nextStatic; + nextStatic += 4; } void process() { -- cgit v1.2.3