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
{
28
RzStrBuf
strbuf
;
29
int
size
;
30
ut8
byte1
;
31
ut8
byte2
;
32
union
{
33
ut32
tok
;
34
st32
target
;
35
};
36
}
CILOp
;
37
38
int
cil_dis
(
CILOp
*
op
,
const
ut8
*
buf
,
int
len
);
39
#endif
len
size_t len
Definition:
6502dis.c:15
cil_dis
int cil_dis(CILOp *op, const ut8 *buf, int len)
Disassemble a CIL buffer.
Definition:
cil_dis.c:150
ut32
uint32_t ut32
Definition:
demangler_util.h:31
buf
voidpf void * buf
Definition:
ioapi.h:138
ut8
uint8_t ut8
Definition:
lh5801.h:11
rz_strbuf.h
st32
#define st32
Definition:
rz_types_base.h:12
CILOp
Definition:
cil_dis.h:27
CILOp::target
st32 target
Definition:
cil_dis.h:34
CILOp::byte2
ut8 byte2
Definition:
cil_dis.h:31
CILOp::size
int size
Definition:
cil_dis.h:29
CILOp::strbuf
RzStrBuf strbuf
Definition:
cil_dis.h:28
CILOp::tok
ut32 tok
Definition:
cil_dis.h:33
CILOp::byte1
ut8 byte1
Definition:
cil_dis.h:30
RzStrBuf
Definition:
rz_strbuf.h:10
op
Definition:
dis.c:32
librz
asm
arch
cil
cil_dis.h
Generated by
1.9.1