diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2024-09-07 00:04:38 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2024-10-05 08:17:21 +0200 |
| commit | 144b7fe1415ff97497fa4ea3b95e8dd6b95d069e (patch) | |
| tree | 68391f6ec2dba2879ca8255ee25ce39ebaa7d4ad /private_include/nw/ops.h | |
First commit1st
Diffstat (limited to 'private_include/nw/ops.h')
| -rw-r--r-- | private_include/nw/ops.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/private_include/nw/ops.h b/private_include/nw/ops.h new file mode 100644 index 0000000..4d8bdf0 --- /dev/null +++ b/private_include/nw/ops.h @@ -0,0 +1,67 @@ +/* + * 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 <nw/types.h> + +void nwp_op_unreachable(struct nw_interp *i); +void nwp_op_nop(struct nw_interp *i); +void nwp_op_block(struct nw_interp *i); +void nwp_op_loop(struct nw_interp *i); +void nwp_op_if(struct nw_interp *i); +void nwp_op_else(struct nw_interp *i); +void nwp_op_end(struct nw_interp *i); +void nwp_op_br(struct nw_interp *i); +void nwp_op_br_if(struct nw_interp *i); +void nwp_op_br_table(struct nw_interp *i); +void nwp_op_return(struct nw_interp *i); +void nwp_op_call(struct nw_interp *i); +void nwp_op_call_indirect(struct nw_interp *i); +void nwp_op_get_local(struct nw_interp *i); +void nwp_op_set_local(struct nw_interp *i); +void nwp_op_tee_local(struct nw_interp *i); +void nwp_op_get_global(struct nw_interp *i); +void nwp_op_set_global(struct nw_interp *i); +void nwp_op_i32_load(struct nw_interp *i); +void nwp_op_i32_store(struct nw_interp *i); +void nwp_op_current_memory(struct nw_interp *i); +void nwp_op_i32_const(struct nw_interp *i); +void nwp_op_i64_const(struct nw_interp *i); +void nwp_op_f32_const(struct nw_interp *i); +void nwp_op_f64_const(struct nw_interp *i); +void nwp_op_i32_sub(struct nw_interp *i); + +void nwp_op_check_no_immediate(struct nw_mod *m); +void nwp_op_check_block(struct nw_mod *m); +void nwp_op_check_loop(struct nw_mod *m); +void nwp_op_check_if(struct nw_mod *m); +void nwp_op_check_else(struct nw_mod *m); +void nwp_op_check_end(struct nw_mod *m); +void nwp_op_check_br(struct nw_mod *m); +void nwp_op_check_br_if(struct nw_mod *m); +void nwp_op_check_br_table(struct nw_mod *m); +void nwp_op_check_call(struct nw_mod *m); +void nwp_op_check_call_indirect(struct nw_mod *m); +void nwp_op_check_local_index(struct nw_mod *m); +void nwp_op_check_local_index(struct nw_mod *m); +void nwp_op_check_global_index(struct nw_mod *m); +void nwp_op_check_memory_immediate(struct nw_mod *m); +void nwp_op_check_i32_const(struct nw_mod *m); +void nwp_op_check_i64_const(struct nw_mod *m); +void nwp_op_check_f32_const(struct nw_mod *m); +void nwp_op_check_f64_const(struct nw_mod *m); +void nwp_op_check_i32_sub(struct nw_mod *m); + +int locals_get(const varuint32 local_index, struct nw_interp *const i, + struct nw_locals **const l, varuint32 *const idx); + +#endif |
