summaryrefslogtreecommitdiff
path: root/test/wasm_backend
diff options
context:
space:
mode:
Diffstat (limited to 'test/wasm_backend')
-rw-r--r--test/wasm_backend/globals_only.cpp21
-rw-r--r--test/wasm_backend/globals_only.txt5
-rw-r--r--test/wasm_backend/hello_num_only.cpp10
-rw-r--r--test/wasm_backend/hello_num_only.txt1
-rw-r--r--test/wasm_backend/hello_world_only.cpp8
-rw-r--r--test/wasm_backend/hello_world_only.txt1
-rw-r--r--test/wasm_backend/hello_world_real.cpp6
-rw-r--r--test/wasm_backend/hello_world_real.txt1
-rw-r--r--test/wasm_backend/i64.load32_u.cpp16
-rw-r--r--test/wasm_backend/i64.load32_u.txt1
-rw-r--r--test/wasm_backend/i64_load.cpp15
-rw-r--r--test/wasm_backend/i64_load.txt4
-rw-r--r--test/wasm_backend/indirect_call_only.cpp50
-rw-r--r--test/wasm_backend/indirect_call_only.txt15
-rw-r--r--test/wasm_backend/unaligned_only.cpp70
-rw-r--r--test/wasm_backend/unaligned_only.txt15
16 files changed, 0 insertions, 239 deletions
diff --git a/test/wasm_backend/globals_only.cpp b/test/wasm_backend/globals_only.cpp
deleted file mode 100644
index 9a2f1bcc8..000000000
--- a/test/wasm_backend/globals_only.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#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);
-}
-
diff --git a/test/wasm_backend/globals_only.txt b/test/wasm_backend/globals_only.txt
deleted file mode 100644
index 56248691d..000000000
--- a/test/wasm_backend/globals_only.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-print: 1
-print: 10
-print: 20
-print: 55
-
diff --git a/test/wasm_backend/hello_num_only.cpp b/test/wasm_backend/hello_num_only.cpp
deleted file mode 100644
index d272f11c6..000000000
--- a/test/wasm_backend/hello_num_only.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <emscripten.h>
-
-int main() {
- int *x = (int*)8;
- *x = 123;
- EM_ASM({
- Module.print("hello, world " + HEAP32[8>>2] + "!");
- });
-}
-
diff --git a/test/wasm_backend/hello_num_only.txt b/test/wasm_backend/hello_num_only.txt
deleted file mode 100644
index 9afd068a4..000000000
--- a/test/wasm_backend/hello_num_only.txt
+++ /dev/null
@@ -1 +0,0 @@
-hello, world 123!
diff --git a/test/wasm_backend/hello_world_only.cpp b/test/wasm_backend/hello_world_only.cpp
deleted file mode 100644
index a4a6a025d..000000000
--- a/test/wasm_backend/hello_world_only.cpp
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <emscripten.h>
-
-int main() {
- EM_ASM({
- Module.print("hello, world!");
- });
-}
-
diff --git a/test/wasm_backend/hello_world_only.txt b/test/wasm_backend/hello_world_only.txt
deleted file mode 100644
index 270c611ee..000000000
--- a/test/wasm_backend/hello_world_only.txt
+++ /dev/null
@@ -1 +0,0 @@
-hello, world!
diff --git a/test/wasm_backend/hello_world_real.cpp b/test/wasm_backend/hello_world_real.cpp
deleted file mode 100644
index 1e39e8bd4..000000000
--- a/test/wasm_backend/hello_world_real.cpp
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <stdio.h>
-
-int main() {
- printf("hello, world!\n");
-}
-
diff --git a/test/wasm_backend/hello_world_real.txt b/test/wasm_backend/hello_world_real.txt
deleted file mode 100644
index 270c611ee..000000000
--- a/test/wasm_backend/hello_world_real.txt
+++ /dev/null
@@ -1 +0,0 @@
-hello, world!
diff --git a/test/wasm_backend/i64.load32_u.cpp b/test/wasm_backend/i64.load32_u.cpp
deleted file mode 100644
index a53c93d86..000000000
--- a/test/wasm_backend/i64.load32_u.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#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
deleted file mode 100644
index 7ac5efc36..000000000
--- a/test/wasm_backend/i64.load32_u.txt
+++ /dev/null
@@ -1 +0,0 @@
-aA
diff --git a/test/wasm_backend/i64_load.cpp b/test/wasm_backend/i64_load.cpp
deleted file mode 100644
index a54b31650..000000000
--- a/test/wasm_backend/i64_load.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-#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;
-}
diff --git a/test/wasm_backend/i64_load.txt b/test/wasm_backend/i64_load.txt
deleted file mode 100644
index 119a531df..000000000
--- a/test/wasm_backend/i64_load.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-AD:0,-1
-AD:1,0
-AD:2,3006
-
diff --git a/test/wasm_backend/indirect_call_only.cpp b/test/wasm_backend/indirect_call_only.cpp
deleted file mode 100644
index ef52a4ad1..000000000
--- a/test/wasm_backend/indirect_call_only.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-#include <emscripten.h>
-
-void print(const char *prefix, int v) {
- int *x = (int*)8; // XXX this order is wrong!
- *x = (int)prefix;
- int *y = (int*)16;
- *y = v;
- EM_ASM({
- Module.print("print: " + Pointer_stringify(HEAP32[8>>2]) + " : " + HEAP32[16>>2]);
- });
-}
-
-void something() {
- print("something", 12);
-}
-
-void more() {
- print("more", -1);
-}
-
-void other(int x) {
- print("other", x + 40);
-}
-
-void yet(int x) {
- print("yet", x + 99);
-}
-
-typedef void (*v)();
-typedef void (*vi)(int);
-
-int main(int argc, char **argv) {
- print("argc", argc);
- v f1[4] = { something, more, something, more };
- print("addr of something", (int)&something);
- print("addr of more", (int)&more);
- for (int i = 0; i < 4 && i < argc*4; i++) {
- print("i", i);
- v curr = f1[i];
- //print("curr address to call", (int)curr);
- curr();
- }
- vi f2[4] = { other, yet, other, yet };
- for (int i = 0; i < 4 && i < argc*4; i++) {
- vi curr = f2[i];
- //print("curr", (int)curr);
- curr(i);
- }
-}
-
diff --git a/test/wasm_backend/indirect_call_only.txt b/test/wasm_backend/indirect_call_only.txt
deleted file mode 100644
index 0927c1885..000000000
--- a/test/wasm_backend/indirect_call_only.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-print: argc : 1
-print: addr of something : 1
-print: addr of more : 2
-print: i : 0
-print: something : 12
-print: i : 1
-print: more : -1
-print: i : 2
-print: something : 12
-print: i : 3
-print: more : -1
-print: other : 40
-print: yet : 100
-print: other : 42
-print: yet : 102
diff --git a/test/wasm_backend/unaligned_only.cpp b/test/wasm_backend/unaligned_only.cpp
deleted file mode 100644
index 75f8b419b..000000000
--- a/test/wasm_backend/unaligned_only.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-#include <stdint.h>
-#include <emscripten.h>
-
-void print(int v) {
- int *x = (int*)8;
- *x = v;
- EM_ASM({
- Module.print("print: " + HEAP32[8>>2]);
- });
-}
-
-char buffer[8];
-
-int main() {
- {
- volatile int16_t* x;
- x = (int16_t*)&buffer[0];
- *x = 0x1234;
- print(*x);
- x = (int16_t*)&buffer[1];
- *x = 0x2345;
- print(*x);
- }
- {
- volatile int32_t* x;
- x = (int32_t*)&buffer[0];
- *x = 0x12345678;
- print(*x);
- x = (int32_t*)&buffer[1];
- *x = 0x23456789;
- print(*x);
- x = (int32_t*)&buffer[2];
- *x = 0x3456789a;
- print(*x);
- x = (int32_t*)&buffer[3];
- *x = 0x456789ab;
- print(*x);
- }
- {
- volatile float* x;
- x = (float*)&buffer[0];
- *x = -0x12345678;
- print(*x);
- x = (float*)&buffer[1];
- *x = -0x12345678;
- print(*x);
- x = (float*)&buffer[2];
- *x = -0x12345678;
- print(*x);
- x = (float*)&buffer[3];
- *x = -0x12345678;
- print(*x);
- }
- {
- volatile double* x;
- x = (double*)&buffer[0];
- *x = -1;
- print(*x);
- x = (double*)&buffer[1];
- *x = -2;
- print(*x);
- x = (double*)&buffer[2];
- *x = -3;
- print(*x);
- x = (double*)&buffer[3];
- *x = -4;
- print(*x);
- }
-}
-
diff --git a/test/wasm_backend/unaligned_only.txt b/test/wasm_backend/unaligned_only.txt
deleted file mode 100644
index 15ca033cf..000000000
--- a/test/wasm_backend/unaligned_only.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-print: 4660
-print: 9029
-print: 305419896
-print: 591751049
-print: 878082202
-print: 1164413355
-print: -305419904
-print: -305419904
-print: -305419904
-print: -305419904
-print: -1
-print: -2
-print: -3
-print: -4
-