summaryrefslogtreecommitdiff
path: root/test/wasm_backend/indirect_call_only.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2019-11-26 18:05:09 -0800
committerGitHub <noreply@github.com>2019-11-26 18:05:09 -0800
commitd15fe879834b0c58d2d4d8526cb428990f7b50a7 (patch)
treee7e05d655cdad2cb0f56b91f723207e430a02e47 /test/wasm_backend/indirect_call_only.cpp
parent5c81d48c70e62e11d9a8fd0fd8231fac10c3bf29 (diff)
downloadbinaryen-d15fe879834b0c58d2d4d8526cb428990f7b50a7.tar.gz
binaryen-d15fe879834b0c58d2d4d8526cb428990f7b50a7.tar.bz2
binaryen-d15fe879834b0c58d2d4d8526cb428990f7b50a7.zip
Remove vanilla tests (#2482)
These have not been used in years and seem outdated.
Diffstat (limited to 'test/wasm_backend/indirect_call_only.cpp')
-rw-r--r--test/wasm_backend/indirect_call_only.cpp50
1 files changed, 0 insertions, 50 deletions
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);
- }
-}
-