diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-04-27 15:15:25 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-04-27 15:15:25 -0700 |
commit | 4a85f62e8a83117a081e9691d8830b6a7a876d1d (patch) | |
tree | a591bf3314a2d65b776d18c3c40308d84e1855dc /test/wasm_backend/globals_only.cpp | |
parent | 3b2b18dc06da3895f0b54a0660ab561f2b305c92 (diff) | |
parent | 63271d39f8a1100a703adc50861e02caefc2a9d5 (diff) | |
download | binaryen-4a85f62e8a83117a081e9691d8830b6a7a876d1d.tar.gz binaryen-4a85f62e8a83117a081e9691d8830b6a7a876d1d.tar.bz2 binaryen-4a85f62e8a83117a081e9691d8830b6a7a876d1d.zip |
Merge pull request #406 from WebAssembly/i64.load32_u
Fix zero-extension in i64.load32_u.
Diffstat (limited to 'test/wasm_backend/globals_only.cpp')
-rw-r--r-- | test/wasm_backend/globals_only.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/wasm_backend/globals_only.cpp b/test/wasm_backend/globals_only.cpp new file mode 100644 index 000000000..9a2f1bcc8 --- /dev/null +++ b/test/wasm_backend/globals_only.cpp @@ -0,0 +1,21 @@ +#include <emscripten.h> + +char c = 10; +short s = 20; +int i = 55; + +void print(int v) { + int *x = (int*)8; + *x = v; + EM_ASM({ + Module.print("print: " + HEAP32[8>>2]); + }); +} + +int main() { + print(1); + print(c); + print(s); + print(i); +} + |