Rizin
unix-like reverse engineering framework and cli tools
EVMMapping.c
Go to the documentation of this file.
1 /* Capstone Disassembly Engine */
2 /* By Nguyen Anh Quynh, 2018 */
3 
4 #ifdef CAPSTONE_HAS_EVM
5 
6 #include <string.h>
7 
8 #include "../../cs_priv.h"
9 #include "../../utils.h"
10 
11 #include "EVMMapping.h"
12 
13 #ifndef CAPSTONE_DIET
14 static cs_evm insns[256] = {
15 #include "EVMMappingInsn.inc"
16 };
17 #endif
18 
19 // look for @id in @insns, given its size in @max.
20 // return -1 if not found
21 static int evm_insn_find(cs_evm *insns, unsigned int max, unsigned int id)
22 {
23  if (id >= max)
24  return -1;
25 
26  if (insns[id].fee == 0xffffffff)
27  // unused opcode
28  return -1;
29 
30  return (int)id;
31 }
32 
33 // fill in details
34 void EVM_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id)
35 {
36  insn->id = id;
37 #ifndef CAPSTONE_DIET
38  if (evm_insn_find(insns, ARR_SIZE(insns), id) > 0) {
39  if (h->detail) {
40  memcpy(&insn->detail->evm, &insns[id], sizeof(insns[id]));
41  }
42  }
43 #endif
44 }
45 
46 #ifndef CAPSTONE_DIET
47 static name_map insn_name_maps[256] = {
48  { EVM_INS_STOP, "stop" },
49  { EVM_INS_ADD, "add" },
50  { EVM_INS_MUL, "mul" },
51  { EVM_INS_SUB, "sub" },
52  { EVM_INS_DIV, "div" },
53  { EVM_INS_SDIV, "sdiv" },
54  { EVM_INS_MOD, "mod" },
55  { EVM_INS_SMOD, "smod" },
56  { EVM_INS_ADDMOD, "addmod" },
57  { EVM_INS_MULMOD, "mulmod" },
58  { EVM_INS_EXP, "exp" },
59  { EVM_INS_SIGNEXTEND, "signextend" },
60  { EVM_INS_INVALID, NULL },
61  { EVM_INS_INVALID, NULL },
62  { EVM_INS_INVALID, NULL },
63  { EVM_INS_INVALID, NULL },
64  { EVM_INS_LT, "lt" },
65  { EVM_INS_GT, "gt" },
66  { EVM_INS_SLT, "slt" },
67  { EVM_INS_SGT, "sgt" },
68  { EVM_INS_EQ, "eq" },
69  { EVM_INS_ISZERO, "iszero" },
70  { EVM_INS_AND, "and" },
71  { EVM_INS_OR, "or" },
72  { EVM_INS_XOR, "xor" },
73  { EVM_INS_NOT, "not" },
74  { EVM_INS_BYTE, "byte" },
75  { EVM_INS_INVALID, NULL },
76  { EVM_INS_INVALID, NULL },
77  { EVM_INS_INVALID, NULL },
78  { EVM_INS_INVALID, NULL },
79  { EVM_INS_INVALID, NULL },
80  { EVM_INS_SHA3, "sha3" },
81  { EVM_INS_INVALID, NULL },
82  { EVM_INS_INVALID, NULL },
83  { EVM_INS_INVALID, NULL },
84  { EVM_INS_INVALID, NULL },
85  { EVM_INS_INVALID, NULL },
86  { EVM_INS_INVALID, NULL },
87  { EVM_INS_INVALID, NULL },
88  { EVM_INS_INVALID, NULL },
89  { EVM_INS_INVALID, NULL },
90  { EVM_INS_INVALID, NULL },
91  { EVM_INS_INVALID, NULL },
92  { EVM_INS_INVALID, NULL },
93  { EVM_INS_INVALID, NULL },
94  { EVM_INS_INVALID, NULL },
95  { EVM_INS_INVALID, NULL },
96  { EVM_INS_ADDRESS, "address" },
97  { EVM_INS_BALANCE, "balance" },
98  { EVM_INS_ORIGIN, "origin" },
99  { EVM_INS_CALLER, "caller" },
100  { EVM_INS_CALLVALUE, "callvalue" },
101  { EVM_INS_CALLDATALOAD, "calldataload" },
102  { EVM_INS_CALLDATASIZE, "calldatasize" },
103  { EVM_INS_CALLDATACOPY, "calldatacopy" },
104  { EVM_INS_CODESIZE, "codesize" },
105  { EVM_INS_CODECOPY, "codecopy" },
106  { EVM_INS_GASPRICE, "gasprice" },
107  { EVM_INS_EXTCODESIZE, "extcodesize" },
108  { EVM_INS_EXTCODECOPY, "extcodecopy" },
109  { EVM_INS_RETURNDATASIZE, "returndatasize" },
110  { EVM_INS_RETURNDATACOPY, "returndatacopy" },
111  { EVM_INS_INVALID, NULL },
112  { EVM_INS_BLOCKHASH, "blockhash" },
113  { EVM_INS_COINBASE, "coinbase" },
114  { EVM_INS_TIMESTAMP, "timestamp" },
115  { EVM_INS_NUMBER, "number" },
116  { EVM_INS_DIFFICULTY, "difficulty" },
117  { EVM_INS_GASLIMIT, "gaslimit" },
118  { EVM_INS_INVALID, NULL },
119  { EVM_INS_INVALID, NULL },
120  { EVM_INS_INVALID, NULL },
121  { EVM_INS_INVALID, NULL },
122  { EVM_INS_INVALID, NULL },
123  { EVM_INS_INVALID, NULL },
124  { EVM_INS_INVALID, NULL },
125  { EVM_INS_INVALID, NULL },
126  { EVM_INS_INVALID, NULL },
127  { EVM_INS_INVALID, NULL },
128  { EVM_INS_POP, "pop" },
129  { EVM_INS_MLOAD, "mload" },
130  { EVM_INS_MSTORE, "mstore" },
131  { EVM_INS_MSTORE8, "mstore8" },
132  { EVM_INS_SLOAD, "sload" },
133  { EVM_INS_SSTORE, "sstore" },
134  { EVM_INS_JUMP, "jump" },
135  { EVM_INS_JUMPI, "jumpi" },
136  { EVM_INS_PC, "pc" },
137  { EVM_INS_MSIZE, "msize" },
138  { EVM_INS_GAS, "gas" },
139  { EVM_INS_JUMPDEST, "jumpdest" },
140  { EVM_INS_INVALID, NULL },
141  { EVM_INS_INVALID, NULL },
142  { EVM_INS_INVALID, NULL },
143  { EVM_INS_INVALID, NULL },
144  { EVM_INS_PUSH1, "push1" },
145  { EVM_INS_PUSH2, "push2" },
146  { EVM_INS_PUSH3, "push3" },
147  { EVM_INS_PUSH4, "push4" },
148  { EVM_INS_PUSH5, "push5" },
149  { EVM_INS_PUSH6, "push6" },
150  { EVM_INS_PUSH7, "push7" },
151  { EVM_INS_PUSH8, "push8" },
152  { EVM_INS_PUSH9, "push9" },
153  { EVM_INS_PUSH10, "push10" },
154  { EVM_INS_PUSH11, "push11" },
155  { EVM_INS_PUSH12, "push12" },
156  { EVM_INS_PUSH13, "push13" },
157  { EVM_INS_PUSH14, "push14" },
158  { EVM_INS_PUSH15, "push15" },
159  { EVM_INS_PUSH16, "push16" },
160  { EVM_INS_PUSH17, "push17" },
161  { EVM_INS_PUSH18, "push18" },
162  { EVM_INS_PUSH19, "push19" },
163  { EVM_INS_PUSH20, "push20" },
164  { EVM_INS_PUSH21, "push21" },
165  { EVM_INS_PUSH22, "push22" },
166  { EVM_INS_PUSH23, "push23" },
167  { EVM_INS_PUSH24, "push24" },
168  { EVM_INS_PUSH25, "push25" },
169  { EVM_INS_PUSH26, "push26" },
170  { EVM_INS_PUSH27, "push27" },
171  { EVM_INS_PUSH28, "push28" },
172  { EVM_INS_PUSH29, "push29" },
173  { EVM_INS_PUSH30, "push30" },
174  { EVM_INS_PUSH31, "push31" },
175  { EVM_INS_PUSH32, "push32" },
176  { EVM_INS_DUP1, "dup1" },
177  { EVM_INS_DUP2, "dup2" },
178  { EVM_INS_DUP3, "dup3" },
179  { EVM_INS_DUP4, "dup4" },
180  { EVM_INS_DUP5, "dup5" },
181  { EVM_INS_DUP6, "dup6" },
182  { EVM_INS_DUP7, "dup7" },
183  { EVM_INS_DUP8, "dup8" },
184  { EVM_INS_DUP9, "dup9" },
185  { EVM_INS_DUP10, "dup10" },
186  { EVM_INS_DUP11, "dup11" },
187  { EVM_INS_DUP12, "dup12" },
188  { EVM_INS_DUP13, "dup13" },
189  { EVM_INS_DUP14, "dup14" },
190  { EVM_INS_DUP15, "dup15" },
191  { EVM_INS_DUP16, "dup16" },
192  { EVM_INS_SWAP1, "swap1" },
193  { EVM_INS_SWAP2, "swap2" },
194  { EVM_INS_SWAP3, "swap3" },
195  { EVM_INS_SWAP4, "swap4" },
196  { EVM_INS_SWAP5, "swap5" },
197  { EVM_INS_SWAP6, "swap6" },
198  { EVM_INS_SWAP7, "swap7" },
199  { EVM_INS_SWAP8, "swap8" },
200  { EVM_INS_SWAP9, "swap9" },
201  { EVM_INS_SWAP10, "swap10" },
202  { EVM_INS_SWAP11, "swap11" },
203  { EVM_INS_SWAP12, "swap12" },
204  { EVM_INS_SWAP13, "swap13" },
205  { EVM_INS_SWAP14, "swap14" },
206  { EVM_INS_SWAP15, "swap15" },
207  { EVM_INS_SWAP16, "swap16" },
208  { EVM_INS_LOG0, "log0" },
209  { EVM_INS_LOG1, "log1" },
210  { EVM_INS_LOG2, "log2" },
211  { EVM_INS_LOG3, "log3" },
212  { EVM_INS_LOG4, "log4" },
213  { EVM_INS_INVALID, NULL },
214  { EVM_INS_INVALID, NULL },
215  { EVM_INS_INVALID, NULL },
216  { EVM_INS_INVALID, NULL },
217  { EVM_INS_INVALID, NULL },
218  { EVM_INS_INVALID, NULL },
219  { EVM_INS_INVALID, NULL },
220  { EVM_INS_INVALID, NULL },
221  { EVM_INS_INVALID, NULL },
222  { EVM_INS_INVALID, NULL },
223  { EVM_INS_INVALID, NULL },
224  { EVM_INS_INVALID, NULL },
225  { EVM_INS_INVALID, NULL },
226  { EVM_INS_INVALID, NULL },
227  { EVM_INS_INVALID, NULL },
228  { EVM_INS_INVALID, NULL },
229  { EVM_INS_INVALID, NULL },
230  { EVM_INS_INVALID, NULL },
231  { EVM_INS_INVALID, NULL },
232  { EVM_INS_INVALID, NULL },
233  { EVM_INS_INVALID, NULL },
234  { EVM_INS_INVALID, NULL },
235  { EVM_INS_INVALID, NULL },
236  { EVM_INS_INVALID, NULL },
237  { EVM_INS_INVALID, NULL },
238  { EVM_INS_INVALID, NULL },
239  { EVM_INS_INVALID, NULL },
240  { EVM_INS_INVALID, NULL },
241  { EVM_INS_INVALID, NULL },
242  { EVM_INS_INVALID, NULL },
243  { EVM_INS_INVALID, NULL },
244  { EVM_INS_INVALID, NULL },
245  { EVM_INS_INVALID, NULL },
246  { EVM_INS_INVALID, NULL },
247  { EVM_INS_INVALID, NULL },
248  { EVM_INS_INVALID, NULL },
249  { EVM_INS_INVALID, NULL },
250  { EVM_INS_INVALID, NULL },
251  { EVM_INS_INVALID, NULL },
252  { EVM_INS_INVALID, NULL },
253  { EVM_INS_INVALID, NULL },
254  { EVM_INS_INVALID, NULL },
255  { EVM_INS_INVALID, NULL },
256  { EVM_INS_INVALID, NULL },
257  { EVM_INS_INVALID, NULL },
258  { EVM_INS_INVALID, NULL },
259  { EVM_INS_INVALID, NULL },
260  { EVM_INS_INVALID, NULL },
261  { EVM_INS_INVALID, NULL },
262  { EVM_INS_INVALID, NULL },
263  { EVM_INS_INVALID, NULL },
264  { EVM_INS_INVALID, NULL },
265  { EVM_INS_INVALID, NULL },
266  { EVM_INS_INVALID, NULL },
267  { EVM_INS_INVALID, NULL },
268  { EVM_INS_INVALID, NULL },
269  { EVM_INS_INVALID, NULL },
270  { EVM_INS_INVALID, NULL },
271  { EVM_INS_INVALID, NULL },
272  { EVM_INS_INVALID, NULL },
273  { EVM_INS_INVALID, NULL },
274  { EVM_INS_INVALID, NULL },
275  { EVM_INS_INVALID, NULL },
276  { EVM_INS_INVALID, NULL },
277  { EVM_INS_INVALID, NULL },
278  { EVM_INS_INVALID, NULL },
279  { EVM_INS_INVALID, NULL },
280  { EVM_INS_INVALID, NULL },
281  { EVM_INS_INVALID, NULL },
282  { EVM_INS_INVALID, NULL },
283  { EVM_INS_INVALID, NULL },
284  { EVM_INS_INVALID, NULL },
285  { EVM_INS_INVALID, NULL },
286  { EVM_INS_INVALID, NULL },
287  { EVM_INS_INVALID, NULL },
288  { EVM_INS_CREATE, "create" },
289  { EVM_INS_CALL, "call" },
290  { EVM_INS_CALLCODE, "callcode" },
291  { EVM_INS_RETURN, "return" },
292  { EVM_INS_DELEGATECALL, "delegatecall" },
293  { EVM_INS_CALLBLACKBOX, "callblackbox" },
294  { EVM_INS_INVALID, NULL },
295  { EVM_INS_INVALID, NULL },
296  { EVM_INS_INVALID, NULL },
297  { EVM_INS_INVALID, NULL },
298  { EVM_INS_STATICCALL, "staticcall" },
299  { EVM_INS_INVALID, NULL },
300  { EVM_INS_INVALID, NULL },
301  { EVM_INS_REVERT, "revert" },
302  { EVM_INS_INVALID, NULL },
303  { EVM_INS_SUICIDE, "suicide" },
304 };
305 #endif
306 
307 const char *EVM_insn_name(csh handle, unsigned int id)
308 {
309 #ifndef CAPSTONE_DIET
310  if (id >= ARR_SIZE(insn_name_maps))
311  return NULL;
312  else
313  return insn_name_maps[id].name;
314 #else
315  return NULL;
316 #endif
317 }
318 
319 #ifndef CAPSTONE_DIET
320 static name_map group_name_maps[] = {
321  // generic groups
322  { EVM_GRP_INVALID, NULL },
323  { EVM_GRP_JUMP, "jump" },
324  // special groups
325  { EVM_GRP_MATH, "math" },
326  { EVM_GRP_STACK_WRITE, "stack_write" },
327  { EVM_GRP_STACK_READ, "stack_read" },
328  { EVM_GRP_MEM_WRITE, "mem_write" },
329  { EVM_GRP_MEM_READ, "mem_read" },
330  { EVM_GRP_STORE_WRITE, "store_write" },
331  { EVM_GRP_STORE_READ, "store_read" },
332  { EVM_GRP_HALT, "halt" },
333 };
334 #endif
335 
336 const char *EVM_group_name(csh handle, unsigned int id)
337 {
338 #ifndef CAPSTONE_DIET
340 #else
341  return NULL;
342 #endif
343 }
344 #endif
const char * EVM_insn_name(csh handle, unsigned int id)
const char * EVM_group_name(csh handle, unsigned int id)
void EVM_get_insn_id(cs_struct *h, cs_insn *insn, unsigned int id)
static name_map group_name_maps[]
static mcore_handle handle
Definition: asm_mcore.c:8
size_t csh
Definition: capstone.h:71
#define NULL
Definition: cris-opc.c:27
int max
Definition: enough.c:225
@ EVM_INS_DUP12
Definition: evm.h:126
@ EVM_INS_AND
Definition: evm.h:44
@ EVM_INS_DUP14
Definition: evm.h:128
@ EVM_INS_CALLDATASIZE
Definition: evm.h:56
@ EVM_INS_PUSH11
Definition: evm.h:93
@ EVM_INS_PUSH12
Definition: evm.h:94
@ EVM_INS_PUSH15
Definition: evm.h:97
@ EVM_INS_DIV
Definition: evm.h:30
@ EVM_INS_CODECOPY
Definition: evm.h:59
@ EVM_INS_SLOAD
Definition: evm.h:75
@ EVM_INS_DUP11
Definition: evm.h:125
@ EVM_INS_RETURNDATACOPY
Definition: evm.h:64
@ EVM_INS_CALLDATALOAD
Definition: evm.h:55
@ EVM_INS_PUSH7
Definition: evm.h:89
@ EVM_INS_CALL
Definition: evm.h:153
@ EVM_INS_PUSH21
Definition: evm.h:103
@ EVM_INS_CALLBLACKBOX
Definition: evm.h:157
@ EVM_INS_MLOAD
Definition: evm.h:72
@ EVM_INS_SMOD
Definition: evm.h:33
@ EVM_INS_DUP1
Definition: evm.h:115
@ EVM_INS_MUL
Definition: evm.h:28
@ EVM_INS_PUSH13
Definition: evm.h:95
@ EVM_INS_PUSH9
Definition: evm.h:91
@ EVM_INS_PUSH5
Definition: evm.h:87
@ EVM_INS_DUP5
Definition: evm.h:119
@ EVM_INS_GT
Definition: evm.h:39
@ EVM_INS_COINBASE
Definition: evm.h:66
@ EVM_INS_GASPRICE
Definition: evm.h:60
@ EVM_INS_DELEGATECALL
Definition: evm.h:156
@ EVM_INS_LOG2
Definition: evm.h:149
@ EVM_INS_SWAP12
Definition: evm.h:142
@ EVM_INS_PUSH30
Definition: evm.h:112
@ EVM_INS_SWAP3
Definition: evm.h:133
@ EVM_INS_PUSH17
Definition: evm.h:99
@ EVM_INS_INVALID
Definition: evm.h:162
@ EVM_INS_RETURN
Definition: evm.h:155
@ EVM_INS_ADDMOD
Definition: evm.h:34
@ EVM_INS_ISZERO
Definition: evm.h:43
@ EVM_INS_STATICCALL
Definition: evm.h:158
@ EVM_INS_MSIZE
Definition: evm.h:80
@ EVM_INS_SWAP7
Definition: evm.h:137
@ EVM_INS_SWAP11
Definition: evm.h:141
@ EVM_INS_PUSH16
Definition: evm.h:98
@ EVM_INS_SSTORE
Definition: evm.h:76
@ EVM_INS_PUSH25
Definition: evm.h:107
@ EVM_INS_PUSH20
Definition: evm.h:102
@ EVM_INS_ADDRESS
Definition: evm.h:50
@ EVM_INS_CALLDATACOPY
Definition: evm.h:57
@ EVM_INS_GAS
Definition: evm.h:81
@ EVM_INS_DUP3
Definition: evm.h:117
@ EVM_INS_ADD
Definition: evm.h:27
@ EVM_INS_PUSH1
Definition: evm.h:83
@ EVM_INS_CALLVALUE
Definition: evm.h:54
@ EVM_INS_DUP9
Definition: evm.h:123
@ EVM_INS_PUSH3
Definition: evm.h:85
@ EVM_INS_PUSH18
Definition: evm.h:100
@ EVM_INS_PUSH24
Definition: evm.h:106
@ EVM_INS_TIMESTAMP
Definition: evm.h:67
@ EVM_INS_DUP15
Definition: evm.h:129
@ EVM_INS_DUP13
Definition: evm.h:127
@ EVM_INS_SWAP8
Definition: evm.h:138
@ EVM_INS_PUSH19
Definition: evm.h:101
@ EVM_INS_POP
Definition: evm.h:71
@ EVM_INS_MSTORE8
Definition: evm.h:74
@ EVM_INS_ORIGIN
Definition: evm.h:52
@ EVM_INS_DUP4
Definition: evm.h:118
@ EVM_INS_SLT
Definition: evm.h:40
@ EVM_INS_EXP
Definition: evm.h:36
@ EVM_INS_RETURNDATASIZE
Definition: evm.h:63
@ EVM_INS_GASLIMIT
Definition: evm.h:70
@ EVM_INS_SUB
Definition: evm.h:29
@ EVM_INS_SWAP4
Definition: evm.h:134
@ EVM_INS_NOT
Definition: evm.h:47
@ EVM_INS_SWAP10
Definition: evm.h:140
@ EVM_INS_SWAP13
Definition: evm.h:143
@ EVM_INS_CALLER
Definition: evm.h:53
@ EVM_INS_DUP10
Definition: evm.h:124
@ EVM_INS_PUSH4
Definition: evm.h:86
@ EVM_INS_PUSH31
Definition: evm.h:113
@ EVM_INS_PUSH26
Definition: evm.h:108
@ EVM_INS_MULMOD
Definition: evm.h:35
@ EVM_INS_SWAP6
Definition: evm.h:136
@ EVM_INS_DUP7
Definition: evm.h:121
@ EVM_INS_PUSH2
Definition: evm.h:84
@ EVM_INS_OR
Definition: evm.h:45
@ EVM_INS_PUSH32
Definition: evm.h:114
@ EVM_INS_LOG0
Definition: evm.h:147
@ EVM_INS_PUSH29
Definition: evm.h:111
@ EVM_INS_DIFFICULTY
Definition: evm.h:69
@ EVM_INS_BYTE
Definition: evm.h:48
@ EVM_INS_EQ
Definition: evm.h:42
@ EVM_INS_EXTCODECOPY
Definition: evm.h:62
@ EVM_INS_PUSH23
Definition: evm.h:105
@ EVM_INS_STOP
Definition: evm.h:26
@ EVM_INS_SWAP9
Definition: evm.h:139
@ EVM_INS_PUSH22
Definition: evm.h:104
@ EVM_INS_CREATE
Definition: evm.h:152
@ EVM_INS_REVERT
Definition: evm.h:159
@ EVM_INS_MSTORE
Definition: evm.h:73
@ EVM_INS_PUSH10
Definition: evm.h:92
@ EVM_INS_SGT
Definition: evm.h:41
@ EVM_INS_LOG1
Definition: evm.h:148
@ EVM_INS_LOG4
Definition: evm.h:151
@ EVM_INS_CALLCODE
Definition: evm.h:154
@ EVM_INS_JUMP
Definition: evm.h:77
@ EVM_INS_EXTCODESIZE
Definition: evm.h:61
@ EVM_INS_SWAP5
Definition: evm.h:135
@ EVM_INS_DUP8
Definition: evm.h:122
@ EVM_INS_DUP6
Definition: evm.h:120
@ EVM_INS_SDIV
Definition: evm.h:31
@ EVM_INS_SIGNEXTEND
Definition: evm.h:37
@ EVM_INS_DUP16
Definition: evm.h:130
@ EVM_INS_SHA3
Definition: evm.h:49
@ EVM_INS_PUSH6
Definition: evm.h:88
@ EVM_INS_BLOCKHASH
Definition: evm.h:65
@ EVM_INS_NUMBER
Definition: evm.h:68
@ EVM_INS_MOD
Definition: evm.h:32
@ EVM_INS_XOR
Definition: evm.h:46
@ EVM_INS_JUMPI
Definition: evm.h:78
@ EVM_INS_DUP2
Definition: evm.h:116
@ EVM_INS_SWAP1
Definition: evm.h:131
@ EVM_INS_JUMPDEST
Definition: evm.h:82
@ EVM_INS_PC
Definition: evm.h:79
@ EVM_INS_SWAP14
Definition: evm.h:144
@ EVM_INS_SUICIDE
Definition: evm.h:160
@ EVM_INS_PUSH28
Definition: evm.h:110
@ EVM_INS_SWAP2
Definition: evm.h:132
@ EVM_INS_PUSH14
Definition: evm.h:96
@ EVM_INS_SWAP15
Definition: evm.h:145
@ EVM_INS_LT
Definition: evm.h:38
@ EVM_INS_BALANCE
Definition: evm.h:51
@ EVM_INS_CODESIZE
Definition: evm.h:58
@ EVM_INS_PUSH27
Definition: evm.h:109
@ EVM_INS_LOG3
Definition: evm.h:150
@ EVM_INS_PUSH8
Definition: evm.h:90
@ EVM_INS_SWAP16
Definition: evm.h:146
@ EVM_GRP_MATH
math instructions
Definition: evm.h:172
@ EVM_GRP_STORE_READ
instructions read from storage
Definition: evm.h:178
@ EVM_GRP_STACK_WRITE
instructions write to stack
Definition: evm.h:173
@ EVM_GRP_JUMP
all jump instructions
Definition: evm.h:170
@ EVM_GRP_MEM_WRITE
instructions write to memory
Definition: evm.h:175
@ EVM_GRP_MEM_READ
instructions read from memory
Definition: evm.h:176
@ EVM_GRP_INVALID
= CS_GRP_INVALID
Definition: evm.h:168
@ EVM_GRP_STACK_READ
instructions read from stack
Definition: evm.h:174
@ EVM_GRP_HALT
instructions halt execution
Definition: evm.h:179
@ EVM_GRP_STORE_WRITE
instructions write to storage
Definition: evm.h:177
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
#define ARR_SIZE(a)
Definition: ocaml.c:13
int id
Definition: op.c:540
#define h(i)
Definition: sha256.c:48
Instruction structure.
Definition: evm.h:18
Definition: utils.h:36
const char * name
Definition: utils.h:38
const char * id2name(const name_map *map, int max, const unsigned int id)
Definition: utils.c:56
static struct insnlist * insns[64]
Definition: tricore-dis.c:69