blob: 1b977bf304b74ab9e48b1e7b5b156fc925c86083 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
/*
* 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>
#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);
int locals_get(const varuint32 local_index, struct nw_interp *const i,
struct nw_locals **const l, varuint32 *const idx);
#endif
|