summaryrefslogtreecommitdiff
path: root/src/s2wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-01-22 17:19:23 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-01-22 17:19:23 -0800
commit627b4f16433739136dc9f51a7dc9db93ce0384a1 (patch)
tree03867e421c28eef468617cee426cdcf22ee4747a /src/s2wasm.h
parentc41dbabf22b069c1dd766e6a44dbe6f4858b7dbf (diff)
downloadbinaryen-627b4f16433739136dc9f51a7dc9db93ce0384a1.tar.gz
binaryen-627b4f16433739136dc9f51a7dc9db93ce0384a1.tar.bz2
binaryen-627b4f16433739136dc9f51a7dc9db93ce0384a1.zip
allocate __stack_pointer completely
Diffstat (limited to 'src/s2wasm.h')
-rw-r--r--src/s2wasm.h4
1 files changed, 3 insertions, 1 deletions
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() {