36 #define ARRAY_SIZE(a) (sizeof(a) / sizeof(*a))
43 static void arg_p (
char *
buf,
unsigned long val,
const char*
const* array,
size_t size) {
44 const char *
s =
val >=
size || array[
val] ? array[
val] :
"unknown";
58 for (; *
d !=
'\0';
d++) {
246 const char* csr_name =
NULL;
250 #define DECLARE_CSR(name, num) case num: csr_name = #name; break;
266 sprintf (
buf+strlen (
buf),
"# internal error, undefined modifier (%c)",
277 #define OP_HASH_IDX(i) ((i) & (riscv_insn_length (i) == 2 ? 3 : OP_MASK_OP))
292 const bool no_alias =
false;
298 if ( !(
op->match_func)(
op, word) ) {
307 if (
op->name &&
op->args) {
325 if (
len < insn_len) {
RZ_API void rz_asm_op_set_asm(RzAsmOp *op, const char *str)
RZ_API char * rz_asm_op_get_asm(RzAsmOp *op)
RZ_API char * sdb_fmt(const char *fmt,...)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
static const char *const riscv_gpr_names_abi[NGPR]
static const char *const riscv_fpr_names_abi[NFPR]
static struct riscv_opcode * riscv_opcodes
static const char *const * riscv_fpr_names
static int riscv_dis(RzAsm *a, RzAsmOp *rop, const ut8 *buf, ut64 len)
static void arg_p(char *buf, unsigned long val, const char *const *array, size_t size)
static void get_insn_args(char *buf, const char *d, insn_t l, uint64_t pc)
static int riscv_disassemble(RzAsm *a, RzAsmOp *rop, insn_t word, int xlen, int len)
static const char *const * riscv_gpr_names
static struct riscv_opcode * get_opcode(insn_t word)
#define EXTRACT_RVC_LD_IMM(x)
#define EXTRACT_RVC_J_IMM(x)
#define EXTRACT_RVC_LDSP_IMM(x)
#define EXTRACT_SBTYPE_IMM(x)
#define EXTRACT_STYPE_IMM(x)
#define EXTRACT_RVC_IMM(x)
#define EXTRACT_RVC_SWSP_IMM(x)
#define EXTRACT_UTYPE_IMM(x)
#define RISCV_BIGIMM_REACH
#define EXTRACT_RVC_SDSP_IMM(x)
static const char *const riscv_rm[8]
#define EXTRACT_RVC_LWSP_IMM(x)
#define EXTRACT_UJTYPE_IMM(x)
#define EXTRACT_RVC_B_IMM(x)
#define EXTRACT_ITYPE_IMM(x)
#define EXTRACT_OPERAND(FIELD, INSN)
#define EXTRACT_RVC_SIMM3(x)
#define EXTRACT_RVC_ADDI4SPN_IMM(x)
#define EXTRACT_RVC_ADDI16SP_IMM(x)
#define EXTRACT_RVC_LW_IMM(x)
static const char *const riscv_pred_succ[16]
static unsigned int riscv_insn_length(insn_t insn)
ut64(WINAPI *w32_GetEnabledXStateFeatures)()