summaryrefslogtreecommitdiff
path: root/test/lld/em_asm64.cpp
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2020-12-14 14:18:16 -0800
committerGitHub <noreply@github.com>2020-12-14 14:18:16 -0800
commitb4928af5e70c85d309f7a074ed80bbcd1ee414f9 (patch)
treed78f645fdacb4f2c961c2ab689b442b1e131355f /test/lld/em_asm64.cpp
parentc1ab2b33f63d5e79143e05de4e8e9e0ddd970e77 (diff)
downloadbinaryen-b4928af5e70c85d309f7a074ed80bbcd1ee414f9.tar.gz
binaryen-b4928af5e70c85d309f7a074ed80bbcd1ee414f9.tar.bz2
binaryen-b4928af5e70c85d309f7a074ed80bbcd1ee414f9.zip
Fixed wasm-emscripten-finalize AsmConstWalker not handling 64-bit pointers (#3431)
Also improved the LLD test scripts to accomodate 64-bit tests.
Diffstat (limited to 'test/lld/em_asm64.cpp')
-rw-r--r--test/lld/em_asm64.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lld/em_asm64.cpp b/test/lld/em_asm64.cpp
new file mode 100644
index 000000000..ed89783f8
--- /dev/null
+++ b/test/lld/em_asm64.cpp
@@ -0,0 +1,8 @@
+#include <emscripten/em_asm.h>
+
+int main() {
+ EM_ASM({ Module.print("Hello world"); });
+ int x = EM_ASM_INT({ return $0 + $1; }, 13, 27);
+ EM_ASM_({ Module.print("Got " + $0); }, x);
+ return 0;
+}