aboutsummaryrefslogtreecommitdiff
path: root/private_include/nw/ops.h
diff options
context:
space:
mode:
Diffstat (limited to 'private_include/nw/ops.h')
-rw-r--r--private_include/nw/ops.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/private_include/nw/ops.h b/private_include/nw/ops.h
new file mode 100644
index 0000000..02f191e
--- /dev/null
+++ b/private_include/nw/ops.h
@@ -0,0 +1,69 @@
+/*
+ * nanowasm, a tiny WebAssembly/Wasm interpreter
+ * Copyright (C) 2023-2024 Xavier Del Campo Romero
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef OPS_H
+#define OPS_H
+
+#include <nanowasm/nw.h>
+#include <stdio.h>
+
+int op_unreachable(struct nw_interp *i);
+int op_nop(struct nw_interp *i);
+int op_block(struct nw_interp *i);
+int op_loop(struct nw_interp *i);
+int op_if(struct nw_interp *i);
+int op_else(struct nw_interp *i);
+int op_end(struct nw_interp *i);
+int op_br(struct nw_interp *i);
+int op_br_if(struct nw_interp *i);
+int op_br_table(struct nw_interp *i);
+int op_return(struct nw_interp *i);
+int op_call(struct nw_interp *i);
+int op_call_indirect(struct nw_interp *i);
+int op_get_local(struct nw_interp *i);
+int op_set_local(struct nw_interp *i);
+int op_tee_local(struct nw_interp *i);
+int op_get_global(struct nw_interp *i);
+int op_set_global(struct nw_interp *i);
+int op_i32_load(struct nw_interp *i);
+int op_i32_store(struct nw_interp *i);
+int op_current_memory(struct nw_interp *i);
+int op_i32_const(struct nw_interp *i);
+int op_i64_const(struct nw_interp *i);
+int op_f32_const(struct nw_interp *i);
+int op_f64_const(struct nw_interp *i);
+int op_i32_sub(struct nw_interp *i);
+
+int check_unreachable(FILE *f);
+int check_nop(FILE *f);
+int check_block(FILE *f);
+int check_loop(FILE *f);
+int check_if(FILE *f);
+int check_else(FILE *f);
+int check_end(FILE *f);
+int check_br(FILE *f);
+int check_br_if(FILE *f);
+int check_br_table(FILE *f);
+int check_return(FILE *f);
+int check_call(FILE *f);
+int check_call_indirect(FILE *f);
+int check_get_local(FILE *f);
+int check_set_local(FILE *f);
+int check_tee_local(FILE *f);
+int check_get_global(FILE *f);
+int check_set_global(FILE *f);
+int check_i32_load(FILE *f);
+int check_i32_store(FILE *f);
+int check_i32_const(FILE *f);
+int check_i64_const(FILE *f);
+int check_f32_const(FILE *f);
+int check_f64_const(FILE *f);
+int check_i32_sub(FILE *f);
+
+#endif