|
Rizin
unix-like reverse engineering framework and cli tools
|
#include <stdio.h>#include <stdlib.h>#include <stdint.h>#include <ctype.h>#include <stdarg.h>#include <rz_asm.h>#include <rz_lib.h>#include <string.h>#include "riscv-opc.h"#include "riscv.h"Go to the source code of this file.
Macros | |
| #define | ARRAY_SIZE(a) (sizeof(a) / sizeof(*a)) |
| #define | DECLARE_CSR(name, num) case num: csr_name = #name; break; |
| #define | OP_HASH_IDX(i) ((i) & (riscv_insn_length (i) == 2 ? 3 : OP_MASK_OP)) |
Functions | |
| 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 struct riscv_opcode * | get_opcode (insn_t word) |
| static int | riscv_disassemble (RzAsm *a, RzAsmOp *rop, insn_t word, int xlen, int len) |
| static int | riscv_dis (RzAsm *a, RzAsmOp *rop, const ut8 *buf, ut64 len) |
Variables | |
| static const char *const * | riscv_gpr_names = riscv_gpr_names_abi |
| static const char *const * | riscv_fpr_names = riscv_fpr_names_abi |
| static int | init = 0 |
| #define OP_HASH_IDX | ( | i | ) | ((i) & (riscv_insn_length (i) == 2 ? 3 : OP_MASK_OP)) |
Definition at line 49 of file riscv.c.
References arg_p(), ARRAY_SIZE, d, EXTRACT_ITYPE_IMM, EXTRACT_OPERAND, EXTRACT_RVC_ADDI16SP_IMM, EXTRACT_RVC_ADDI4SPN_IMM, EXTRACT_RVC_B_IMM, EXTRACT_RVC_IMM, EXTRACT_RVC_J_IMM, EXTRACT_RVC_LD_IMM, EXTRACT_RVC_LDSP_IMM, EXTRACT_RVC_LW_IMM, EXTRACT_RVC_LWSP_IMM, EXTRACT_RVC_SDSP_IMM, EXTRACT_RVC_SIMM3, EXTRACT_RVC_SWSP_IMM, EXTRACT_SBTYPE_IMM, EXTRACT_STYPE_IMM, EXTRACT_UJTYPE_IMM, EXTRACT_UTYPE_IMM, NULL, OP_MASK_RD, OP_MASK_RS1, OP_SH_RD, OP_SH_RS1, pc, PFMT64x, rd, RISCV_BIGIMM_REACH, riscv_fpr_names, riscv_gpr_names, RISCV_IMM_BITS, riscv_pred_succ, riscv_rm, RS2, sprintf, ut64(), and X_SP.
Referenced by riscv_disassemble().
|
static |
Definition at line 273 of file riscv.c.
References init, NUMOPCODES, op, OP_HASH_IDX, OP_MASK_OP, and riscv_opcodes.
Referenced by riscv_disassemble().
Definition at line 318 of file riscv.c.
References a, len, memcpy(), riscv_disassemble(), riscv_insn_length(), and RZ_MIN.
Referenced by disassemble().
Definition at line 291 of file riscv.c.
References a, get_insn_args(), get_opcode(), INSN_ALIAS, isdigit, NUMOPCODES, PFMT64x, riscv_opcodes, rz_asm_op_get_asm(), rz_asm_op_set_asm(), sdb_fmt(), and ut64().
Referenced by riscv_dis().
|
static |
Definition at line 41 of file riscv.c.
Referenced by get_opcode().
|
static |
Definition at line 40 of file riscv.c.
Referenced by get_insn_args().
|
static |
Definition at line 39 of file riscv.c.
Referenced by get_insn_args().