Rizin
unix-like reverse engineering framework and cli tools
asm_riscv.c
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2015-2021 qnix <qnix@0x80.org>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #include <rz_types.h>
5 #include <rz_util.h>
6 #include <rz_asm.h>
7 #include <rz_lib.h>
8 #include "../arch/riscv/riscv-opc.c"
9 #include "../arch/riscv/riscv.c"
10 
11 static int disassemble(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len) {
12  return op->size = riscv_dis(a, op, buf, len);
13 }
14 
16  .name = "riscv",
17  .desc = "RISC-V",
18  .arch = "riscv",
19  .bits = 32 | 64,
21  .license = "GPL3",
22  .disassemble = &disassemble,
23 };
24 
25 #ifndef RZ_PLUGIN_INCORE
28  .data = &rz_asm_plugin_riscv,
30 };
31 #endif
size_t len
Definition: 6502dis.c:15
RZ_API RzLibStruct rizin_plugin
Definition: asm_riscv.c:26
RzAsmPlugin rz_asm_plugin_riscv
Definition: asm_riscv.c:15
static int disassemble(RzAsm *a, RzAsmOp *op, const ut8 *buf, int len)
Definition: asm_riscv.c:11
#define RZ_API
voidpf void * buf
Definition: ioapi.h:138
uint8_t ut8
Definition: lh5801.h:11
static int riscv_dis(RzAsm *a, RzAsmOp *rop, const ut8 *buf, ut64 len)
Definition: riscv.c:318
@ RZ_LIB_TYPE_ASM
Definition: rz_lib.h:72
#define RZ_SYS_ENDIAN_BIG
Definition: rz_types.h:527
#define RZ_SYS_ENDIAN_LITTLE
Definition: rz_types.h:526
#define RZ_VERSION
Definition: rz_version.h:8
#define a(i)
Definition: sha256.c:41
const char * name
Definition: rz_asm.h:130
const char * version
Definition: rz_asm.h:133
Definition: dis.c:32