Rizin
unix-like reverse engineering framework and cli tools
cil_dis.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2022 wingdeans <wingdeans@protonmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #ifndef CIL_ASM_H
5 #define CIL_ASM_H
6 
7 #include <rz_util/rz_strbuf.h>
8 
9 // eg. OPCODE_SINGLE(CIL_OP_NOP, "nop", InlineNone, 0x00, NEXT)
10 // ->
11 // enum {
12 // OPCODE_SINGLE = 0x00,
13 // ...
14 // }
15 #define OPCODE_SINGLE(name, str, param, byte, control) name = byte,
16 #define OPCODE_DOUBLE(name, str, param, byte, control) name = byte,
17 #define OPCODE_PREFIX(name, str, param, byte, control) name = byte,
18 enum {
19 #include "opcodes_single.def"
20 #include "opcodes_double.def"
21 #include "opcodes_prefix.def"
22 };
23 #undef OPCODE_SINGLE
24 #undef OPCODE_DOUBLE
25 #undef OPCODE_PREFIX
26 
27 typedef struct {
29  int size;
32  union {
35  };
36 } CILOp;
37 
38 int cil_dis(CILOp *op, const ut8 *buf, int len);
39 #endif
size_t len
Definition: 6502dis.c:15
int cil_dis(CILOp *op, const ut8 *buf, int len)
Disassemble a CIL buffer.
Definition: cil_dis.c:150
uint32_t ut32
voidpf void * buf
Definition: ioapi.h:138
uint8_t ut8
Definition: lh5801.h:11
#define st32
Definition: rz_types_base.h:12
Definition: cil_dis.h:27
st32 target
Definition: cil_dis.h:34
ut8 byte2
Definition: cil_dis.h:31
int size
Definition: cil_dis.h:29
RzStrBuf strbuf
Definition: cil_dis.h:28
ut32 tok
Definition: cil_dis.h:33
ut8 byte1
Definition: cil_dis.h:30
Definition: dis.c:32