-
Notifications
You must be signed in to change notification settings - Fork 0
/
ops.h
113 lines (90 loc) · 1.34 KB
/
ops.h
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
static char *opnames[256] = {
"OP_UNDEF",
"OP_IGNORE",
"OP_BREAK",
"OP_ENTER",
"OP_LEAVE",
"OP_CALL",
"OP_PUSH",
"OP_POP",
"OP_CONST",
"OP_LOCAL",
"OP_JUMP",
//-------------------
"OP_EQ",
"OP_NE",
"OP_LTI",
"OP_LEI",
"OP_GTI",
"OP_GEI",
"OP_LTU",
"OP_LEU",
"OP_GTU",
"OP_GEU",
"OP_EQF",
"OP_NEF",
"OP_LTF",
"OP_LEF",
"OP_GTF",
"OP_GEF",
//-------------------
"OP_LOAD1",
"OP_LOAD2",
"OP_LOAD4",
"OP_STORE1",
"OP_STORE2",
"OP_STORE4",
"OP_ARG",
"OP_BLOCK_COPY",
//-------------------
"OP_SEX8",
"OP_SEX16",
"OP_NEGI",
"OP_ADD",
"OP_SUB",
"OP_DIVI",
"OP_DIVU",
"OP_MODI",
"OP_MODU",
"OP_MULI",
"OP_MULU",
"OP_BAND",
"OP_BOR",
"OP_BXOR",
"OP_BCOM",
"OP_LSH",
"OP_RSHI",
"OP_RSHU",
"OP_NEGF",
"OP_ADDF",
"OP_SUBF",
"OP_DIVF",
"OP_MULF",
"OP_CVIF",
"OP_CVFI"
};
static unsigned char op_argsize[256] =
{
[OP_ENTER] = 4,
[OP_LEAVE] = 4,
[OP_CONST] = 4,
[OP_LOCAL] = 4,
[OP_EQ] = 4,
[OP_NE] = 4,
[OP_LTI] = 4,
[OP_LEI] = 4,
[OP_GTI] = 4,
[OP_GEI] = 4,
[OP_LTU] = 4,
[OP_LEU] = 4,
[OP_GTU] = 4,
[OP_GEU] = 4,
[OP_EQF] = 4,
[OP_NEF] = 4,
[OP_LTF] = 4,
[OP_LEF] = 4,
[OP_GTF] = 4,
[OP_GEF] = 4,
[OP_ARG] = 1,
[OP_BLOCK_COPY] = 4,
};