summaryrefslogtreecommitdiff
path: root/test/wasm_backend
diff options
context:
space:
mode:
authorDan Gohman <sunfish@mozilla.com>2016-04-27 13:46:35 -0700
committerDan Gohman <sunfish@mozilla.com>2016-04-27 13:46:35 -0700
commita4967c271b106032c0264d3ec13c04c41481c3e4 (patch)
tree5be5342f3689a1505b7732771085509dd9603947 /test/wasm_backend
parent65dd0079b21cc72a3e2e6f5bc2f43ab0e2d3abfd (diff)
downloadbinaryen-a4967c271b106032c0264d3ec13c04c41481c3e4.tar.gz
binaryen-a4967c271b106032c0264d3ec13c04c41481c3e4.tar.bz2
binaryen-a4967c271b106032c0264d3ec13c04c41481c3e4.zip
Add a testcase.
Diffstat (limited to 'test/wasm_backend')
-rw-r--r--test/wasm_backend/i64.load32_u.cpp16
-rw-r--r--test/wasm_backend/i64.load32_u.txt1
2 files changed, 17 insertions, 0 deletions
diff --git a/test/wasm_backend/i64.load32_u.cpp b/test/wasm_backend/i64.load32_u.cpp
new file mode 100644
index 000000000..a53c93d86
--- /dev/null
+++ b/test/wasm_backend/i64.load32_u.cpp
@@ -0,0 +1,16 @@
+#include <stdint.h>
+#include <stdio.h>
+
+volatile uint64_t x = 0x0101010101010101;
+volatile uint32_t u = 0xfefefefe;
+
+int main(void)
+{
+ putchar('a' + (x >> 60));
+
+ x = u; // i64.load32_u
+
+ putchar('A' + (x >> 60));
+ putchar('\n');
+ return 0;
+}
diff --git a/test/wasm_backend/i64.load32_u.txt b/test/wasm_backend/i64.load32_u.txt
new file mode 100644
index 000000000..7ac5efc36
--- /dev/null
+++ b/test/wasm_backend/i64.load32_u.txt
@@ -0,0 +1 @@
+aA