Rizin
unix-like reverse engineering framework and cli tools
|
#include <string.h>
#include <rz_types.h>
#include <rz_lib.h>
#include <rz_asm.h>
#include <rz_analysis.h>
Go to the source code of this file.
Classes | |
struct | arc_fields_t |
Macros | |
#define | ARC_REG_ILINK1 0x1d |
#define | ARC_REG_ILINK2 0x1e |
#define | ARC_REG_BLINK 0x1f |
#define | ARC_REG_LIMM 0x3e |
#define | ARC_REG_PCL 0x3f |
#define | SIGN_EXT_S7(imm) sign_ext(7, imm); |
#define | SIGN_EXT_S8(imm) sign_ext(8, imm); |
#define | SIGN_EXT_S9(imm) sign_ext(9, imm); |
#define | SIGN_EXT_S10(imm) sign_ext(10, imm); |
#define | SIGN_EXT_S12(imm) sign_ext(12, imm); |
#define | SIGN_EXT_S13(imm) sign_ext(13, imm); |
#define | SIGN_EXT_S21(imm) sign_ext(21, imm); |
#define | SIGN_EXT_S25(imm) sign_ext(25, imm); |
Typedefs | |
typedef struct arc_fields_t | arc_fields |
Functions | |
static ut32 | rz_read_me32_arc (const void *src) |
static int | sign_ext (int bits, int imm) |
static int | map_cond2rizin (ut8 cond) |
static void | arcompact_jump (RzAnalysisOp *op, ut64 addr, ut64 jump, ut8 delay) |
static void | arcompact_jump_cond (RzAnalysisOp *op, ut64 addr, ut64 jump, ut8 delay, ut8 cond) |
static void | arcompact_branch (RzAnalysisOp *op, ut64 addr, st64 offset, ut8 delay) |
static void | map_zz2refptr (RzAnalysisOp *op, ut8 mode_zz) |
static int | arcompact_genops_jmp (RzAnalysisOp *op, ut64 addr, arc_fields *f, ut64 basic_type) |
static int | arcompact_genops (RzAnalysisOp *op, ut64 addr, ut32 words[2]) |
static int | arcompact_op (RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *data, int len) |
static int | arc_op (RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *data, int len, RzAnalysisOpMask mask) |
static int | archinfo (RzAnalysis *analysis, int query) |
static char * | get_reg_profile (RzAnalysis *analysis) |
Variables | |
RzAnalysisPlugin | rz_analysis_plugin_arc |
RZ_API RzLibStruct | rizin_plugin |
#define ARC_REG_BLINK 0x1f |
Definition at line 12 of file analysis_arc.c.
#define ARC_REG_ILINK1 0x1d |
Definition at line 10 of file analysis_arc.c.
#define ARC_REG_ILINK2 0x1e |
Definition at line 11 of file analysis_arc.c.
#define ARC_REG_LIMM 0x3e |
Definition at line 13 of file analysis_arc.c.
#define ARC_REG_PCL 0x3f |
Definition at line 14 of file analysis_arc.c.
Definition at line 56 of file analysis_arc.c.
Definition at line 57 of file analysis_arc.c.
Definition at line 58 of file analysis_arc.c.
Definition at line 59 of file analysis_arc.c.
Definition at line 60 of file analysis_arc.c.
Definition at line 53 of file analysis_arc.c.
Definition at line 54 of file analysis_arc.c.
Definition at line 55 of file analysis_arc.c.
typedef struct arc_fields_t arc_fields |
|
static |
Definition at line 1007 of file analysis_arc.c.
References addr, arcompact_op(), b, rz_analysis_t::bits, len, RZ_ANALYSIS_OP_TYPE_ADD, RZ_ANALYSIS_OP_TYPE_AND, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_ANALYSIS_OP_TYPE_NOP, RZ_ANALYSIS_OP_TYPE_OR, RZ_ANALYSIS_OP_TYPE_ROR, RZ_ANALYSIS_OP_TYPE_SUB, RZ_ANALYSIS_OP_TYPE_XOR, and rz_read_le32().
|
static |
Definition at line 1059 of file analysis_arc.c.
References rz_analysis_t::bits, RZ_ANALYSIS_ARCHINFO_ALIGN, RZ_ANALYSIS_ARCHINFO_MAX_OP_SIZE, and RZ_ANALYSIS_ARCHINFO_MIN_OP_SIZE.
|
static |
Definition at line 102 of file analysis_arc.c.
References addr, and arcompact_jump().
Referenced by arcompact_op().
|
static |
Definition at line 196 of file analysis_arc.c.
References addr, ARC_REG_LIMM, ARC_REG_PCL, arcompact_genops_jmp(), fields, map_cond2rizin(), RZ_ANALYSIS_OP_TYPE_ABS, RZ_ANALYSIS_OP_TYPE_ADD, RZ_ANALYSIS_OP_TYPE_AND, RZ_ANALYSIS_OP_TYPE_CALL, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_ANALYSIS_OP_TYPE_CMOV, RZ_ANALYSIS_OP_TYPE_CMP, RZ_ANALYSIS_OP_TYPE_ILL, RZ_ANALYSIS_OP_TYPE_IO, RZ_ANALYSIS_OP_TYPE_JMP, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_MUL, RZ_ANALYSIS_OP_TYPE_NOT, RZ_ANALYSIS_OP_TYPE_NULL, RZ_ANALYSIS_OP_TYPE_OR, RZ_ANALYSIS_OP_TYPE_RET, RZ_ANALYSIS_OP_TYPE_ROL, RZ_ANALYSIS_OP_TYPE_ROR, RZ_ANALYSIS_OP_TYPE_SAL, RZ_ANALYSIS_OP_TYPE_SAR, RZ_ANALYSIS_OP_TYPE_SHR, RZ_ANALYSIS_OP_TYPE_SUB, RZ_ANALYSIS_OP_TYPE_SWI, RZ_ANALYSIS_OP_TYPE_TRAP, RZ_ANALYSIS_OP_TYPE_XCHG, RZ_ANALYSIS_OP_TYPE_XOR, SIGN_EXT_S12, and SIGN_EXT_S13.
Referenced by arcompact_op().
|
static |
Definition at line 117 of file analysis_arc.c.
References addr, ARC_REG_BLINK, ARC_REG_ILINK1, ARC_REG_ILINK2, ARC_REG_LIMM, arcompact_jump(), arcompact_jump_cond(), f, map_cond2rizin(), RZ_ANALYSIS_OP_TYPE_CALL, RZ_ANALYSIS_OP_TYPE_CCALL, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_ANALYSIS_OP_TYPE_CRET, RZ_ANALYSIS_OP_TYPE_JMP, RZ_ANALYSIS_OP_TYPE_RET, RZ_ANALYSIS_OP_TYPE_UCALL, RZ_ANALYSIS_OP_TYPE_UCCALL, RZ_ANALYSIS_OP_TYPE_UCJMP, RZ_ANALYSIS_OP_TYPE_UJMP, SIGN_EXT_S12, and ut64().
Referenced by arcompact_genops().
|
static |
Definition at line 91 of file analysis_arc.c.
Referenced by arcompact_branch(), arcompact_genops_jmp(), arcompact_jump_cond(), and arcompact_op().
|
static |
Definition at line 97 of file analysis_arc.c.
References addr, arcompact_jump(), cond, jump(), and map_cond2rizin().
Referenced by arcompact_genops_jmp().
|
static |
Definition at line 441 of file analysis_arc.c.
References addr, ARC_REG_LIMM, ARC_REG_PCL, arcompact_branch(), arcompact_genops(), arcompact_jump(), rz_analysis_t::big_endian, fields, len, map_cond2rizin(), map_zz2refptr(), RZ_ANALYSIS_OP_TYPE_ABS, RZ_ANALYSIS_OP_TYPE_ADD, RZ_ANALYSIS_OP_TYPE_AND, RZ_ANALYSIS_OP_TYPE_CALL, RZ_ANALYSIS_OP_TYPE_CCALL, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_ANALYSIS_OP_TYPE_CMP, RZ_ANALYSIS_OP_TYPE_CPL, RZ_ANALYSIS_OP_TYPE_CRET, RZ_ANALYSIS_OP_TYPE_ILL, RZ_ANALYSIS_OP_TYPE_JMP, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_MUL, RZ_ANALYSIS_OP_TYPE_NOP, RZ_ANALYSIS_OP_TYPE_NOT, RZ_ANALYSIS_OP_TYPE_OR, RZ_ANALYSIS_OP_TYPE_POP, RZ_ANALYSIS_OP_TYPE_PUSH, RZ_ANALYSIS_OP_TYPE_RET, RZ_ANALYSIS_OP_TYPE_SAL, RZ_ANALYSIS_OP_TYPE_SAR, RZ_ANALYSIS_OP_TYPE_SHL, RZ_ANALYSIS_OP_TYPE_SHR, RZ_ANALYSIS_OP_TYPE_STORE, RZ_ANALYSIS_OP_TYPE_SUB, RZ_ANALYSIS_OP_TYPE_TRAP, RZ_ANALYSIS_OP_TYPE_UCALL, RZ_ANALYSIS_OP_TYPE_UJMP, RZ_ANALYSIS_OP_TYPE_UNK, RZ_ANALYSIS_OP_TYPE_XOR, rz_read_be32(), rz_read_me32_arc(), RZ_TYPE_COND_EQ, RZ_TYPE_COND_NE, SIGN_EXT_S10, SIGN_EXT_S13, SIGN_EXT_S21, SIGN_EXT_S25, SIGN_EXT_S7, SIGN_EXT_S8, SIGN_EXT_S9, and UT64_MAX.
Referenced by arc_op().
|
static |
Definition at line 1076 of file analysis_arc.c.
References rz_analysis_t::bits, and strdup().
Definition at line 62 of file analysis_arc.c.
References C, cond, NC, RZ_TYPE_COND_AL, RZ_TYPE_COND_EQ, RZ_TYPE_COND_GE, RZ_TYPE_COND_GT, RZ_TYPE_COND_HI, RZ_TYPE_COND_LE, RZ_TYPE_COND_LS, RZ_TYPE_COND_LT, RZ_TYPE_COND_MI, RZ_TYPE_COND_NE, RZ_TYPE_COND_PL, RZ_TYPE_COND_VC, and RZ_TYPE_COND_VS.
Referenced by arcompact_genops(), arcompact_genops_jmp(), arcompact_jump_cond(), and arcompact_op().
|
static |
Definition at line 106 of file analysis_arc.c.
References RZ_ANALYSIS_OP_TYPE_ILL.
Referenced by arcompact_op().
Definition at line 42 of file analysis_arc.c.
RZ_API RzLibStruct rizin_plugin |
Definition at line 1143 of file analysis_arc.c.
RzAnalysisPlugin rz_analysis_plugin_arc |
Definition at line 1131 of file analysis_arc.c.