Rizin
unix-like reverse engineering framework and cli tools
rz_asm.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2009-2020 nibble <nibble.ds@gmail.com>
2 // SPDX-FileCopyrightText: 2009-2020 pancake <pancake@nopcode.org>
3 // SPDX-License-Identifier: LGPL-3.0-only
4 
5 #ifndef RZ_ASM_H
6 #define RZ_ASM_H
7 
8 #include <rz_util/rz_print.h>
9 #include <rz_types.h>
10 #include <rz_bin.h> // only for binding, no hard dep required
11 #include <rz_util.h>
12 #include <rz_parse.h>
13 #include <rz_bind.h>
14 #include <rz_config.h>
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
21 
22 /* backward compatibility */
23 #define RZ_ASM_ARCH_NONE RZ_SYS_ARCH_NONE
24 #define RZ_ASM_ARCH_X86 RZ_SYS_ARCH_X86
25 #define RZ_ASM_ARCH_ARM RZ_SYS_ARCH_ARM
26 #define RZ_ASM_ARCH_PPC RZ_SYS_ARCH_PPC
27 #define RZ_ASM_ARCH_M68K RZ_SYS_ARCH_M68K
28 #define RZ_ASM_ARCH_JAVA RZ_SYS_ARCH_JAVA
29 #define RZ_ASM_ARCH_LM32 RZ_SYS_ARCH_LM32
30 #define RZ_ASM_ARCH_MIPS RZ_SYS_ARCH_MIPS
31 #define RZ_ASM_ARCH_SPARC RZ_SYS_ARCH_SPARC
32 #define RZ_ASM_ARCH_XAP RZ_SYS_ARCH_XAP
33 #define RZ_ASM_ARCH_MSIL RZ_SYS_ARCH_MSIL
34 #define RZ_ASM_ARCH_OBJD RZ_SYS_ARCH_OBJD
35 #define RZ_ASM_ARCH_BF RZ_SYS_ARCH_BF
36 #define RZ_ASM_ARCH_SH RZ_SYS_ARCH_SH
37 #define RZ_ASM_ARCH_Z80 RZ_SYS_ARCH_Z80
38 #define RZ_ASM_ARCH_I8080 RZ_SYS_ARCH_I8080
39 #define RZ_ASM_ARCH_ARC RZ_SYS_ARCH_ARC
40 #define RZ_ASM_ARCH_HPPA RZ_SYS_ARCH_HPPA
41 
42 #define RZ_ASM_GET_OFFSET(x, y, z) \
43  (x && x->binb.bin && x->binb.get_offset) ? x->binb.get_offset(x->binb.bin, y, z) : -1
44 
45 #define RZ_ASM_GET_NAME(x, y, z) \
46  (x && x->binb.bin && x->binb.get_name) ? x->binb.get_name(x->binb.bin, y, z) : NULL
47 
48 enum {
53  RZ_ASM_SYNTAX_REGNUM, // alias for capstone's NOREGNAME
54  RZ_ASM_SYNTAX_JZ, // hack to use jz instead of je on x86
55 };
56 
57 enum {
63  RZ_ASM_MOD_SRCREG2 = '2'
64 };
65 
66 typedef struct rz_asm_op_t {
67  int size; // instruction size (must be deprecated. just use buf.len
68  int bitsize; // instruction size in bits (or 0 if fits in 8bit bytes) // why this field is dup?
69  int payload; // size of payload (opsize = (size-payload))
70  // But this is pretty slow..so maybe we should add some accessors
73  RzBuffer *buf_inc; // must die
76 
77 typedef struct rz_asm_code_t {
78 #if 1
79  int len;
81  char *assembly;
82 #else
83  RzAsmOp op; // we have those fields already inside RzAsmOp
84 #endif
85  RzList *equs; // TODO: must be a hash
90 
91 // TODO: Must use Hashtable instead of this hack
92 typedef struct {
93  char *key;
94  char *value;
95 } RzAsmEqu;
96 
97 #define _RzAsmPlugin struct rz_asm_plugin_t
98 typedef struct rz_asm_t {
99  char *cpu;
100  int bits;
102  int syntax;
104  void *core;
105  void *plugin_data;
108  RzList /*<RzAsmPlugin *>*/ *plugins;
115  char *features;
116  char *platforms;
117  int invhex; // invalid instructions displayed in hex
118  int pcalign;
120  int bitshift;
121  bool immsign; // Print signed immediates as negative values, not their unsigned representation.
122  bool immdisp; // Display immediates with # symbol (for arm architectures). false = show hashs
123  bool utf8; // Flag for plugins: Use utf-8 characters.
124  HtPP *flags;
125  int seggrn;
126  bool pseudo;
128 
129 typedef struct rz_asm_plugin_t {
130  const char *name;
131  const char *arch;
132  const char *author;
133  const char *version;
134  const char *cpus;
135  const char *desc;
136  const char *license;
137  int bits;
138  int endian;
139  bool (*init)(void **user);
140  bool (*fini)(void *user);
141  int (*disassemble)(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len);
142  int (*assemble)(RzAsm *a, RzAsmOp *op, const char *buf);
143  char *(*mnemonics)(RzAsm *a, int id, bool json);
144  RzConfig *(*get_config)(void);
145  const char *features;
146  const char *platforms;
148 
149 #ifdef RZ_API
150 /* asm.c */
151 RZ_API RzAsm *rz_asm_new(void);
152 RZ_API void rz_asm_free(RzAsm *a);
153 RZ_API char *rz_asm_mnemonics(RzAsm *a, int id, bool json);
154 RZ_API int rz_asm_mnemonics_byname(RzAsm *a, const char *name);
156 RZ_API bool rz_asm_setup(RzAsm *a, const char *arch, int bits, int big_endian);
157 RZ_API bool rz_asm_is_valid(RzAsm *a, const char *name);
158 RZ_API bool rz_asm_use(RzAsm *a, const char *name);
159 RZ_API bool rz_asm_use_assembler(RzAsm *a, const char *name);
160 RZ_API bool rz_asm_set_arch(RzAsm *a, const char *name, int bits);
162 RZ_DEPRECATE RZ_API void rz_asm_set_cpu(RzAsm *a, const char *cpu);
163 RZ_API bool rz_asm_set_big_endian(RzAsm *a, bool big_endian);
165 RZ_API int rz_asm_syntax_from_string(const char *name);
167 RZ_API int rz_asm_disassemble(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len);
168 RZ_API int rz_asm_assemble(RzAsm *a, RzAsmOp *op, const char *buf);
170 RZ_API RzAsmCode *rz_asm_mdisassemble_hexstr(RzAsm *a, RzParse *p, const char *hexstr);
171 RZ_API RzAsmCode *rz_asm_massemble(RzAsm *a, const char *buf);
172 RZ_API RzAsmCode *rz_asm_rasm_assemble(RzAsm *a, const char *buf, bool use_spp);
173 RZ_API char *rz_asm_to_string(RzAsm *a, ut64 addr, const ut8 *b, int l);
174 /* to ease the use of the native bindings (not used in r2) */
175 RZ_API ut8 *rz_asm_from_string(RzAsm *a, ut64 addr, const char *b, int *l);
176 RZ_API int rz_asm_sub_names_input(RzAsm *a, const char *f);
177 RZ_API int rz_asm_sub_names_output(RzAsm *a, const char *f);
178 RZ_API char *rz_asm_describe(RzAsm *a, const char *str);
180 RZ_API void rz_asm_list_directives(void);
181 
182 /* code.c */
184 RZ_API void *rz_asm_code_free(RzAsmCode *acode);
186 RZ_API bool rz_asm_code_set_equ(RzAsmCode *code, const char *key, const char *value);
188 RZ_API char *rz_asm_code_get_hex(RzAsmCode *acode);
189 
190 /* op.c */
198 RZ_API void rz_asm_op_set_asm(RzAsmOp *op, const char *str);
199 RZ_API int rz_asm_op_set_hex(RzAsmOp *op, const char *str);
200 RZ_API int rz_asm_op_set_hexbuf(RzAsmOp *op, const ut8 *buf, int len);
201 RZ_API void rz_asm_op_set_buf(RzAsmOp *op, const ut8 *str, int len);
203 
204 // String tokenizing
213 
214 /* plugin pointers */
233 extern RzAsmPlugin rz_asm_plugin_hexagon;
234 extern RzAsmPlugin rz_asm_plugin_hexagon_gnu;
282 
283 #endif
284 
285 #ifdef __cplusplus
286 }
287 #endif
288 
289 #endif
size_t len
Definition: 6502dis.c:15
ut8 op
Definition: 6502dis.c:13
RZ_API void * rz_asm_code_free(RzAsmCode *acode)
Definition: acode.c:11
RZ_API bool rz_asm_code_set_equ(RzAsmCode *code, const char *key, const char *value)
Definition: acode.c:38
RZ_API void rz_asm_equ_item_free(RzAsmEqu *equ)
Definition: acode.c:21
RZ_API RzAsmCode * rz_asm_code_new(void)
Definition: acode.c:7
RZ_API char * rz_asm_code_get_hex(RzAsmCode *acode)
Definition: acode.c:68
RZ_API char * rz_asm_code_equ_replace(RzAsmCode *code, char *str)
Definition: acode.c:58
static ut32 cpu[32]
Definition: analysis_or1k.c:21
RZ_API int rz_asm_op_get_size(RzAsmOp *op)
Definition: aop.c:47
RZ_API void rz_asm_op_fini(RzAsmOp *op)
Definition: aop.c:21
RZ_API void rz_asm_op_set_buf(RzAsmOp *op, const ut8 *buf, int len)
Definition: aop.c:83
RZ_API void rz_asm_op_init(RzAsmOp *op)
Definition: aop.c:15
RZ_API int rz_asm_op_set_hexbuf(RzAsmOp *op, const ut8 *buf, int len)
Definition: aop.c:71
RZ_API RzAsmOp * rz_asm_op_new(void)
Definition: aop.c:6
RZ_API ut8 * rz_asm_op_get_buf(RzAsmOp *op)
Definition: aop.c:42
RZ_API char * rz_asm_op_get_hex(RzAsmOp *op)
Definition: aop.c:28
RZ_API void rz_asm_op_free(RzAsmOp *op)
Definition: aop.c:10
RZ_API int rz_asm_op_set_hex(RzAsmOp *op, const char *str)
Definition: aop.c:58
RZ_API void rz_asm_op_set_asm(RzAsmOp *op, const char *str)
Definition: aop.c:53
RZ_API char * rz_asm_op_get_asm(RzAsmOp *op)
Definition: aop.c:37
RZ_API int rz_asm_mnemonics_byname(RzAsm *a, const char *name)
Definition: asm.c:1255
RZ_API char * rz_asm_to_string(RzAsm *a, ut64 addr, const ut8 *b, int l)
Definition: asm.c:1200
RZ_API RzAsmCode * rz_asm_mdisassemble(RzAsm *a, const ut8 *buf, int len)
Definition: asm.c:743
RZ_API RZ_OWN RzAsmTokenString * rz_asm_tokenize_asm_regex(RZ_BORROW RzStrBuf *asm_str, RzPVector *patterns)
Splits an asm string into tokens by using the given regex patterns.
Definition: asm.c:1472
RZ_API bool rz_asm_add(RzAsm *a, RzAsmPlugin *p)
Definition: asm.c:333
RZ_API void rz_asm_list_directives(void)
Definition: asm.c:687
RZ_API void rz_asm_free(RzAsm *a)
Definition: asm.c:315
RZ_API int rz_asm_syntax_from_string(const char *name)
Definition: asm.c:1227
RZ_API bool rz_asm_set_big_endian(RzAsm *a, bool b)
Definition: asm.c:496
RZ_API bool rz_asm_is_valid(RzAsm *a, const char *name)
Definition: asm.c:349
RZ_API RzAsm * rz_asm_new(void)
Definition: asm.c:262
RZ_API void rz_asm_token_pattern_free(void *p)
Definition: asm.c:1333
RZ_DEPRECATE RZ_API int rz_asm_set_bits(RzAsm *a, int bits)
Definition: asm.c:488
RZ_API RZ_OWN RzAsmParseParam * rz_asm_get_parse_param(RZ_NULLABLE const RzReg *reg, ut32 ana_op_type)
Does all kinds of NULL checks on the parameters and returns an initialized RzAsmParseParam or NULL on...
Definition: asm.c:1763
RZ_API bool rz_asm_setup(RzAsm *a, const char *arch, int bits, int big_endian)
Definition: asm.c:283
RZ_API char * rz_asm_describe(RzAsm *a, const char *str)
Definition: asm.c:1187
RZ_API int rz_asm_assemble(RzAsm *a, RzAsmOp *op, const char *buf)
Definition: asm.c:697
RZ_API RzAsmCode * rz_asm_rasm_assemble(RzAsm *a, const char *buf, bool use_spp)
Definition: asm.c:1270
RZ_API bool rz_asm_set_syntax(RzAsm *a, int syntax)
Definition: asm.c:518
RZ_DEPRECATE RZ_API RZ_OWN RzStrBuf * rz_asm_colorize_asm_str(RZ_BORROW RzStrBuf *asm_str, RZ_BORROW RzPrint *p, RZ_NULLABLE const RzAsmParseParam *param, RZ_NULLABLE const RzAsmTokenString *toks)
Colors a given asm string and returns it. If toks is not NULL it uses the tokens to color the asm str...
Definition: asm.c:1741
RZ_API char * rz_asm_mnemonics(RzAsm *a, int id, bool json)
Definition: asm.c:1247
RZ_DEPRECATE RZ_API void rz_asm_set_cpu(RzAsm *a, const char *cpu)
Definition: asm.c:477
RZ_API int rz_asm_set_pc(RzAsm *a, ut64 pc)
Definition: asm.c:533
RZ_API RZ_OWN RzAsmTokenString * rz_asm_token_string_new(const char *asm_str)
Definition: asm.c:1295
RZ_API RzAsmCode * rz_asm_massemble(RzAsm *a, const char *assembly)
Definition: asm.c:814
RZ_API bool rz_asm_use(RzAsm *a, const char *name)
Puts an Asm plugin in use and disables the previous one.
Definition: asm.c:429
RZ_API bool rz_asm_set_arch(RzAsm *a, const char *name, int bits)
Definition: asm.c:1195
RZ_API RzAsmCode * rz_asm_mdisassemble_hexstr(RzAsm *a, RzParse *p, const char *hexstr)
Definition: asm.c:783
RZ_API int rz_asm_sub_names_input(RzAsm *a, const char *f)
Definition: asm.c:290
RZ_API RzList * rz_asm_get_plugins(RzAsm *a)
Definition: asm.c:1191
RZ_DEPRECATE RZ_API RZ_OWN RzAsmTokenString * rz_asm_tokenize_asm_string(RZ_BORROW RzStrBuf *asm_str, RZ_NULLABLE const RzAsmParseParam *param)
Parses an asm string generically. It parses the string like: <mnemmonic> <op>, <op>....
Definition: asm.c:1718
RZ_API int rz_asm_disassemble(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len)
Definition: asm.c:543
RZ_API RZ_OWN RzAsmTokenString * rz_asm_token_string_clone(RZ_OWN RZ_NONNULL RzAsmTokenString *toks)
Definition: asm.c:1315
RZ_API bool rz_asm_use_assembler(RzAsm *a, const char *name)
Definition: asm.c:363
RZ_API int rz_asm_sub_names_output(RzAsm *a, const char *f)
Definition: asm.c:303
RZ_API ut8 * rz_asm_from_string(RzAsm *a, ut64 addr, const char *b, int *l)
Definition: asm.c:1213
RZ_API void rz_asm_token_string_free(RZ_OWN RzAsmTokenString *toks)
Definition: asm.c:1306
RzAsmPlugin rz_asm_plugin_6502
Definition: asm_6502.c:17
RzAsmPlugin rz_asm_plugin_8051
Definition: asm_8051.c:30
RzAsmPlugin rz_asm_plugin_amd29k
Definition: asm_amd29k.c:28
RzAsmPlugin rz_asm_plugin_arc
Definition: asm_arc.c:84
RzAsmPlugin rz_asm_plugin_arm_as
Definition: asm_arm_as.c:34
RzAsmPlugin rz_asm_plugin_arm_cs
Definition: asm_arm_cs.c:298
RzAsmPlugin rz_asm_plugin_avr
Definition: asm_avr.c:40
RzAsmPlugin rz_asm_plugin_bf
Definition: asm_bf.c:109
RzAsmPlugin rz_asm_plugin_chip8
Definition: asm_chip8.c:89
RzAsmPlugin rz_asm_plugin_cil
Definition: asm_cil.c:17
RzAsmPlugin rz_asm_plugin_cr16
Definition: asm_cr16.c:18
RzAsmPlugin rz_asm_plugin_cris_gnu
Definition: asm_cris_gnu.c:130
RzAsmPlugin rz_asm_plugin_dalvik
Definition: asm_dalvik.c:550
RzAsmPlugin rz_asm_plugin_dcpu16
Definition: asm_dcpu16.c:31
RzAsmPlugin rz_asm_plugin_ebc
Definition: asm_ebc.c:22
RzAsmPlugin rz_asm_plugin_gb
Definition: asm_gb.c:23
RzAsmPlugin rz_asm_plugin_h8300
Definition: asm_h8300.c:18
RzAsmPlugin rz_asm_plugin_hppa_gnu
Definition: asm_hppa_gnu.c:80
RzAsmPlugin rz_asm_plugin_i4004
Definition: asm_i4004.c:15
RzAsmPlugin rz_asm_plugin_i8080
Definition: asm_i8080.c:15
RzAsmPlugin rz_asm_plugin_java
Definition: asm_java.c:138
RzAsmPlugin rz_asm_plugin_lanai_gnu
Definition: asm_lanai_gnu.c:68
RzAsmPlugin rz_asm_plugin_lh5801
Definition: asm_lh5801.c:29
RzAsmPlugin rz_asm_plugin_lm32
Definition: asm_lm32.c:447
RzAsmPlugin rz_asm_plugin_luac
Definition: asm_luac.c:59
RzAsmPlugin rz_asm_plugin_m680x_cs
Definition: asm_m680x_cs.c:108
RzAsmPlugin rz_asm_plugin_m68k_cs
Definition: asm_m68k_cs.c:154
RzAsmPlugin rz_asm_plugin_malbolge
Definition: asm_malbolge.c:31
RzAsmPlugin rz_asm_plugin_mcore
Definition: asm_mcore.c:27
RzAsmPlugin rz_asm_plugin_mcs96
Definition: asm_mcs96.c:110
RzAsmPlugin rz_asm_plugin_mips_cs
Definition: asm_mips_cs.c:88
RzAsmPlugin rz_asm_plugin_mips_gnu
Definition: asm_mips_gnu.c:123
RzAsmPlugin rz_asm_plugin_msp430
Definition: asm_msp430.c:33
RzAsmPlugin rz_asm_plugin_nios2
Definition: asm_nios2.c:69
RzAsmPlugin rz_asm_plugin_null
Definition: asm_null.c:21
RzAsmPlugin rz_asm_plugin_or1k
Definition: asm_or1k.c:161
RzAsmPlugin rz_asm_plugin_pic
Definition: asm_pic.c:28
RzAsmPlugin rz_asm_plugin_ppc_as
Definition: asm_ppc_as.c:22
RzAsmPlugin rz_asm_plugin_ppc_cs
Definition: asm_ppc_cs.c:122
RzAsmPlugin rz_asm_plugin_propeller
Definition: asm_propeller.c:29
RzAsmPlugin rz_asm_plugin_pyc
Definition: asm_pyc.c:57
RzAsmPlugin rz_asm_plugin_riscv
Definition: asm_riscv.c:15
RzAsmPlugin rz_asm_plugin_riscv_cs
Definition: asm_riscv_cs.c:54
RzAsmPlugin rz_asm_plugin_rsp
Definition: asm_rsp.c:89
RzAsmPlugin rz_asm_plugin_sh
Definition: asm_sh.c:38
RzAsmPlugin rz_asm_plugin_snes
Definition: asm_snes.c:48
RzAsmPlugin rz_asm_plugin_sparc_cs
Definition: asm_sparc_cs.c:62
RzAsmPlugin rz_asm_plugin_sparc_gnu
Definition: asm_sparc_gnu.c:77
RzAsmPlugin rz_asm_plugin_spc700
Definition: asm_spc700.c:17
RzAsmPlugin rz_asm_plugin_sysz
Definition: asm_sysz.c:57
RzAsmPlugin rz_asm_plugin_tms320
Definition: asm_tms320.c:118
RzAsmPlugin rz_asm_plugin_tms320c64x
RzAsmPlugin rz_asm_plugin_tricore
Definition: asm_tricore.c:99
RzAsmPlugin rz_asm_plugin_v810
Definition: asm_v810.c:27
RzAsmPlugin rz_asm_plugin_v850
Definition: asm_v850.c:28
RzAsmPlugin rz_asm_plugin_vax
Definition: asm_vax.c:74
RzAsmPlugin rz_asm_plugin_wasm
Definition: asm_wasm.c:30
RzAsmPlugin rz_asm_plugin_x86_as
Definition: asm_x86_as.c:33
RzAsmPlugin rz_asm_plugin_x86_cs
Definition: asm_x86_cs.c:109
RzAsmPlugin rz_asm_plugin_x86_nasm
Definition: asm_x86_nasm.c:50
RzAsmPlugin rz_asm_plugin_x86_nz
Definition: asm_x86_nz.c:5249
RzAsmPlugin rz_asm_plugin_xap
Definition: asm_xap.c:40
RzAsmPlugin rz_asm_plugin_xcore_cs
Definition: asm_xcore_cs.c:41
RzAsmPlugin rz_asm_plugin_xtensa
Definition: asm_xtensa.c:69
RzAsmPlugin rz_asm_plugin_z80
Definition: asm_z80.c:20
int bits(struct state *s, int need)
Definition: blast.c:72
static int value
Definition: cmd_api.c:93
#define RZ_API
cs_arch arch
Definition: cstool.c:13
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len key
Definition: sflib.h:118
uint32_t ut32
voidpf void * buf
Definition: ioapi.h:138
#define reg(n)
uint8_t ut8
Definition: lh5801.h:11
void * p
Definition: libc.cpp:67
static RzMain foo[]
Definition: main.c:11
int id
Definition: op.c:540
struct rz_asm_t RzAsm
struct rz_asm_op_t RzAsmOp
struct rz_asm_plugin_t RzAsmPlugin
RZ_LIB_VERSION_HEADER(rz_asm)
struct rz_asm_code_t RzAsmCode
@ RZ_ASM_MOD_RAWVALUE
Definition: rz_asm.h:58
@ RZ_ASM_MOD_SRCREG1
Definition: rz_asm.h:62
@ RZ_ASM_MOD_DSTREG
Definition: rz_asm.h:60
@ RZ_ASM_MOD_SRCREG2
Definition: rz_asm.h:63
@ RZ_ASM_MOD_VALUE
Definition: rz_asm.h:59
@ RZ_ASM_MOD_SRCREG0
Definition: rz_asm.h:61
@ RZ_ASM_SYNTAX_NONE
Definition: rz_asm.h:49
@ RZ_ASM_SYNTAX_REGNUM
Definition: rz_asm.h:53
@ RZ_ASM_SYNTAX_ATT
Definition: rz_asm.h:51
@ RZ_ASM_SYNTAX_INTEL
Definition: rz_asm.h:50
@ RZ_ASM_SYNTAX_MASM
Definition: rz_asm.h:52
@ RZ_ASM_SYNTAX_JZ
Definition: rz_asm.h:54
#define _RzAsmPlugin
Definition: rz_asm.h:97
#define RZ_NULLABLE
Definition: rz_types.h:65
#define RZ_OWN
Definition: rz_types.h:62
#define RZ_NONNULL
Definition: rz_types.h:64
#define RZ_BORROW
Definition: rz_types.h:63
#define RZ_DEPRECATE
Definition: rz_types.h:66
static int
Definition: sfsocketcall.h:114
#define b(i)
Definition: sha256.c:42
#define f(i)
Definition: sha256.c:46
#define a(i)
Definition: sha256.c:41
char * key
Definition: rz_asm.h:93
char * value
Definition: rz_asm.h:94
An tokenized asm string.
Definition: rz_print.h:72
Definition: inftree9.h:24
Definition: z80asm.h:102
ut64 code_offset
Definition: rz_asm.h:86
char * assembly
Definition: rz_asm.h:81
ut8 * bytes
Definition: rz_asm.h:80
int code_align
Definition: rz_asm.h:88
RzList * equs
Definition: rz_asm.h:85
ut64 data_offset
Definition: rz_asm.h:87
RzStrBuf buf
Definition: rz_asm.h:71
int bitsize
Definition: rz_asm.h:68
RzStrBuf buf_asm
Definition: rz_asm.h:72
RzBuffer * buf_inc
Definition: rz_asm.h:73
int payload
Definition: rz_asm.h:69
int size
Definition: rz_asm.h:67
RzAsmTokenString * asm_toks
Tokenized asm string.
Definition: rz_asm.h:74
const char * desc
Definition: rz_asm.h:135
const char * license
Definition: rz_asm.h:136
const char * cpus
Definition: rz_asm.h:134
bool(* fini)(void *user)
Definition: rz_asm.h:140
bool(* init)(void **user)
Definition: rz_asm.h:139
const char * features
Definition: rz_asm.h:145
const char * name
Definition: rz_asm.h:130
const char * author
Definition: rz_asm.h:132
int(* assemble)(RzAsm *a, RzAsmOp *op, const char *buf)
Definition: rz_asm.h:142
int(* disassemble)(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len)
Definition: rz_asm.h:141
const char * platforms
Definition: rz_asm.h:146
const char * version
Definition: rz_asm.h:133
const char * arch
Definition: rz_asm.h:131
Sdb * pair
Definition: rz_asm.h:112
bool utf8
Definition: rz_asm.h:123
bool pseudo
Definition: rz_asm.h:126
void * plugin_data
Definition: rz_asm.h:105
int pcalign
Definition: rz_asm.h:118
int bitshift
Definition: rz_asm.h:120
int big_endian
Definition: rz_asm.h:101
int invhex
Definition: rz_asm.h:117
int syntax
Definition: rz_asm.h:102
char * features
Definition: rz_asm.h:115
ut64 pc
Definition: rz_asm.h:103
RzNum * num
Definition: rz_asm.h:114
int bits
Definition: rz_asm.h:100
RzSyscall * syscall
Definition: rz_asm.h:113
RzParse * ofilter
Definition: rz_asm.h:111
int dataalign
Definition: rz_asm.h:119
RzList * plugins
Definition: rz_asm.h:108
_RzAsmPlugin * acur
Definition: rz_asm.h:107
int seggrn
Definition: rz_asm.h:125
HtPP * flags
Definition: rz_asm.h:124
bool immsign
Definition: rz_asm.h:121
RzParse * ifilter
Definition: rz_asm.h:110
void * core
Definition: rz_asm.h:104
char * cpu
Definition: rz_asm.h:99
RzBinBind binb
Definition: rz_asm.h:109
bool immdisp
Definition: rz_asm.h:122
char * platforms
Definition: rz_asm.h:116
_RzAsmPlugin * cur
Definition: rz_asm.h:106
Definition: sdb.h:63
#define bool
Definition: sysdefs.h:146
Definition: dis.c:32
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
static int addr
Definition: z80asm.c:58