diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-11-01 20:55:49 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-11-01 20:55:49 -0800 |
commit | 4990b96eaa6ce91ecbb84b784df5622f9742f47e (patch) | |
tree | c8564b477f809526ceaaff9263d845982c00701b /test | |
parent | d8c2d69dd253bd6f67e1f3c374be2c20d43dfc03 (diff) | |
download | binaryen-4990b96eaa6ce91ecbb84b784df5622f9742f47e.tar.gz binaryen-4990b96eaa6ce91ecbb84b784df5622f9742f47e.tar.bz2 binaryen-4990b96eaa6ce91ecbb84b784df5622f9742f47e.zip |
add stack test for an imported mapped global
Diffstat (limited to 'test')
-rw-r--r-- | test/mem.cpp | 5 | ||||
-rw-r--r-- | test/mem.post.js | 2 | ||||
-rw-r--r-- | test/mem.txt | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/test/mem.cpp b/test/mem.cpp index a48d2e3d2..e45149df1 100644 --- a/test/mem.cpp +++ b/test/mem.cpp @@ -25,5 +25,10 @@ void EMSCRIPTEN_KEEPALIVE storeu32(size_t addr, uint32_t v) { ((uint32_t*)addr)[ void EMSCRIPTEN_KEEPALIVE storef32(size_t addr, float v) { ((float*)addr)[0] = v; } void EMSCRIPTEN_KEEPALIVE storef64(size_t addr, double v) { ((double*)addr)[0] = v; } +int* EMSCRIPTEN_KEEPALIVE get_stack() { + int t; + return &t; +} + } diff --git a/test/mem.post.js b/test/mem.post.js index 00eda262c..c4cf49a70 100644 --- a/test/mem.post.js +++ b/test/mem.post.js @@ -49,3 +49,5 @@ test('u32'); test('f32'); test('f64'); +Module.print('stack: ' + Module['_get_stack']()); + diff --git a/test/mem.txt b/test/mem.txt index ae087e142..e97e3bfc1 100644 --- a/test/mem.txt +++ b/test/mem.txt @@ -190,3 +190,4 @@ f64 4294967294 ==> 4294967294 pre ==> 4294967294 post ==> -1.066886858533604e+282 +stack: 2784 |