summaryrefslogtreecommitdiff
path: root/test/wasm_backend/i64_load.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/wasm_backend/i64_load.cpp')
-rw-r--r--test/wasm_backend/i64_load.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/wasm_backend/i64_load.cpp b/test/wasm_backend/i64_load.cpp
new file mode 100644
index 000000000..a54b31650
--- /dev/null
+++ b/test/wasm_backend/i64_load.cpp
@@ -0,0 +1,15 @@
+#include <stdint.h>
+#include <stdio.h>
+
+struct S1 { unsigned lo:32; unsigned mid:2; unsigned hi:30; };
+
+static struct S1 g_68 = { -1, 0, 0xbbe }; // 0xbbe = 3006
+
+extern "C" void emscripten_autodebug_i32(int32_t x, int32_t y);
+
+int main() {
+ emscripten_autodebug_i32(0, g_68.lo);
+ emscripten_autodebug_i32(1, g_68.mid);
+ emscripten_autodebug_i32(2, g_68.hi);
+ return 0;
+}