mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-03 19:01:31 +00:00
2434c3ca74
* Add riscv for capstone5 in the meson * Report capstone version in the asm plugins * Many changes in the ppc analysis, seems like it's improved, (emulation quality and xrefs) * Update all tests and report issues in capstone4 to upstream * Fix-x86-16 test marked as broken as it needs better fix
32 lines
751 B
C
32 lines
751 B
C
/* radare - LGPL - Copyright 2015-2021 - qnix */
|
|
|
|
#include <r_types.h>
|
|
#include <r_util.h>
|
|
#include <r_asm.h>
|
|
#include <r_lib.h>
|
|
#include "cs_version.h"
|
|
#include "../arch/riscv/riscv-opc.c"
|
|
#include "../arch/riscv/riscv.c"
|
|
|
|
static int disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, int len) {
|
|
return op->size = riscv_dis (a, op, buf, len);
|
|
}
|
|
|
|
RAsmPlugin r_asm_plugin_riscv = {
|
|
.name = "riscv",
|
|
.desc = "Capstone "CAPSTONE_VERSION_STRING" RISC-V disassembler",
|
|
.arch = "riscv",
|
|
.bits = 32|64,
|
|
.endian = R_SYS_ENDIAN_LITTLE | R_SYS_ENDIAN_BIG,
|
|
.license = "GPL",
|
|
.disassemble = &disassemble,
|
|
};
|
|
|
|
#ifndef R2_PLUGIN_INCORE
|
|
R_API RLibStruct radare_plugin = {
|
|
.type = R_LIB_TYPE_ASM,
|
|
.data = &r_asm_plugin_riscv,
|
|
.version = R2_VERSION
|
|
};
|
|
#endif
|