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>
#include "../arch/sh/sh_il.h"
Go to the source code of this file.
Macros | |
#define | API static |
#define | LONG_SIZE 4 |
#define | WORD_SIZE 2 |
#define | BYTE_SIZE 1 |
#define | BIT_32(x) x ",0x80000000,&" |
#define | S16_EXT(x) x ",DUP,0x8000,&,?{,0xFFFFFFFFFFFF0000,|,}" |
#define | S32_EXT(x) x ",DUP,0x80000000,&,?{,0xFFFFFFFF00000000,|,}" |
#define | IS_T "sr,0x1,&," |
#define | SET_T "0x1,sr,|=" |
#define | CLR_T "0xFFFFFFFE,sr,&=" |
#define | IS_CLRT(x) x == 0x0008 |
#define | IS_NOP(x) x == 0x0009 |
#define | IS_RTS(x) x == 0x000b |
#define | IS_SETT(x) x == 0x0018 |
#define | IS_DIV0U(x) x == 0x0019 |
#define | IS_SLEEP(x) x == 0x001b |
#define | IS_CLRMAC(x) x == 0x0028 |
#define | IS_RTE(x) x == 0x002b |
#define | IS_STCSR1(x) (((x)&0xF0CF) == 0x0002) |
#define | IS_BSRF(x) ((x)&0xf0ff) == 0x0003 |
#define | IS_BRAF(x) (((x)&0xf0ff) == 0x0023) |
#define | IS_MOVB_REG_TO_R0REL(x) (((x)&0xF00F) == 0x0004) |
#define | IS_MOVW_REG_TO_R0REL(x) (((x)&0xF00F) == 0x0005) |
#define | IS_MOVL_REG_TO_R0REL(x) (((x)&0xF00F) == 0x0006) |
#define | IS_MULL(x) (((x)&0xF00F) == 0x0007) |
#define | IS_MOVB_R0REL_TO_REG(x) (((x)&0xF00F) == 0x000C) |
#define | IS_MOVW_R0REL_TO_REG(x) (((x)&0xF00F) == 0x000D) |
#define | IS_MOVL_R0REL_TO_REG(x) (((x)&0xF00F) == 0x000E) |
#define | IS_MACL(x) (((x)&0xF00F) == 0x000F) |
#define | IS_MOVT(x) (((x)&0xF0FF) == 0x0029) |
#define | IS_STSMACH(x) (((x)&0xF0FF) == 0x000A) |
#define | IS_STSMACL(x) (((x)&0xF0FF) == 0x001A) |
#define | IS_STSPR(x) (((x)&0xF0FF) == 0x002A) |
#define | IS_MOVB_REG_TO_REGREF(x) (((x)&0xF00F) == 0x2000) |
#define | IS_MOVW_REG_TO_REGREF(x) (((x)&0xF00F) == 0x2001) |
#define | IS_MOVL_REG_TO_REGREF(x) (((x)&0xF00F) == 0x2002) |
#define | IS_PUSHB(x) (((x)&0xF00F) == 0x2004) |
#define | IS_PUSHW(x) (((x)&0xF00F) == 0x2005) |
#define | IS_PUSHL(x) (((x)&0xF00F) == 0x2006) |
#define | IS_DIV0S(x) (((x)&0xF00F) == 0x2007) |
#define | IS_TSTRR(x) (((x)&0xF00F) == 0x2008) |
#define | IS_AND_REGS(x) (((x)&0xF00F) == 0x2009) |
#define | IS_XOR_REGS(x) (((x)&0xF00F) == 0x200A) |
#define | IS_OR_REGS(x) (((x)&0xF00F) == 0x200B) |
#define | IS_CMPSTR(x) (((x)&0xF00F) == 0x200C) |
#define | IS_XTRCT(x) (((x)&0xF00F) == 0x200D) |
#define | IS_MULUW(x) (((x)&0xF00F) == 0x200E) |
#define | IS_MULSW(x) (((x)&0xF00F) == 0x200F) |
#define | IS_CMPEQ(x) (((x)&0xF00F) == 0x3000) |
#define | IS_CMPHS(x) (((x)&0xF00F) == 0x3002) |
#define | IS_CMPGE(x) (((x)&0xF00F) == 0x3003) |
#define | IS_CMPHI(x) (((x)&0xF00F) == 0x3006) |
#define | IS_CMPGT(x) (((x)&0xF00F) == 0x3007) |
#define | IS_DIV1(x) (((x)&0xF00F) == 0x3004) |
#define | IS_DMULU(x) (((x)&0xF00F) == 0x3005) |
#define | IS_DMULS(x) (((x)&0xF00F) == 0x300D) |
#define | IS_SUB(x) (((x)&0xF00F) == 0x3008) |
#define | IS_SUBC(x) (((x)&0xF00F) == 0x300A) |
#define | IS_SUBV(x) (((x)&0xF00F) == 0x300B) |
#define | IS_ADD(x) (((x)&0xF00F) == 0x300C) |
#define | IS_ADDC(x) (((x)&0xF00F) == 0x300E) |
#define | IS_ADDV(x) (((x)&0xF00F) == 0x300F) |
#define | IS_MACW(x) (((x)&0xF00F) == 0x400F) |
#define | IS_JSR(x) (((x)&0xf0ff) == 0x400b) |
#define | IS_JMP(x) (((x)&0xf0ff) == 0x402b) |
#define | IS_CMPPL(x) (((x)&0xf0ff) == 0x4015) |
#define | IS_CMPPZ(x) (((x)&0xf0ff) == 0x4011) |
#define | IS_LDCSR(x) (((x)&0xF0FF) == 0x400E) |
#define | IS_LDCGBR(x) (((x)&0xF0FF) == 0x401E) |
#define | IS_LDCVBR(x) (((x)&0xF0FF) == 0x402E) |
#define | IS_LDCLSR(x) (((x)&0xF0FF) == 0x4007) |
#define | IS_LDCLSRGBR(x) (((x)&0xF0FF) == 0x4017) |
#define | IS_LDCLSRVBR(x) (((x)&0xF0FF) == 0x4027) |
#define | IS_LDSMACH(x) (((x)&0xF0FF) == 0x400A) |
#define | IS_LDSMACL(x) (((x)&0xF0FF) == 0x401A) |
#define | IS_LDSLMACH(x) (((x)&0xF0FF) == 0x4006) |
#define | IS_LDSLMACL(x) (((x)&0xF0FF) == 0x4016) |
#define | IS_LDSPR(x) (((x)&0xF0FF) == 0x402A) |
#define | IS_LDSLPR(x) (((x)&0xF0FF) == 0x4026) |
#define | IS_ROTCR(x) (((x)&0xF0FF) == 0x4025) |
#define | IS_ROTCL(x) (((x)&0xF0FF) == 0x4024) |
#define | IS_ROTL(x) (((x)&0xF0FF) == 0x4004) |
#define | IS_ROTR(x) (((x)&0xF0FF) == 0x4005) |
#define | IS_STSLMACL(x) (((x)&0xF0FF) == 0x4012) |
#define | IS_STSLMACH(x) (((x)&0xF0FF) == 0x4002) |
#define | IS_STCLSR(x) (((x)&0xF0FF) == 0x4003) |
#define | IS_STCLGBR(x) (((x)&0xF0FF) == 0x4013) |
#define | IS_STCLVBR(x) (((x)&0xF0FF) == 0x4023) |
#define | IS_STSLPR(x) (((x)&0xF0FF) == 0x4022) |
#define | IS_TASB(x) (((x)&0xF0FF) == 0x401B) |
#define | IS_DT(x) (((x)&0xF0FF) == 0x4010) |
#define | IS_MOVB_REGREF_TO_REG(x) (((x)&0xF00F) == 0x6000) |
#define | IS_MOVW_REGREF_TO_REG(x) (((x)&0xF00F) == 0x6001) |
#define | IS_MOVL_REGREF_TO_REG(x) (((x)&0xF00F) == 0x6002) |
#define | IS_MOV_REGS(x) (((x)&0xf00f) == 0x6003) |
#define | IS_MOVB_POP(x) (((x)&0xF00F) == 0x6004) |
#define | IS_MOVW_POP(x) (((x)&0xF00F) == 0x6005) |
#define | IS_MOVL_POP(x) (((x)&0xF00F) == 0x6006) |
#define | IS_NOT(x) (((x)&0xF00F) == 0x6007) |
#define | IS_SWAPB(x) (((x)&0xF00F) == 0x6008) |
#define | IS_SWAPW(x) (((x)&0xF00F) == 0x6009) |
#define | IS_NEG(x) (((x)&0xF00F) == 0x600B) |
#define | IS_NEGC(x) (((x)&0xF00F) == 0x600A) |
#define | IS_EXT(x) (((x)&0xF00C) == 0x600C) |
#define | IS_MOVB_R0_REGDISP(x) (((x)&0xFF00) == 0x8000) |
#define | IS_MOVW_R0_REGDISP(x) (((x)&0xFF00) == 0x8100) |
#define | IS_MOVB_REGDISP_R0(x) (((x)&0xFF00) == 0x8400) |
#define | IS_MOVW_REGDISP_R0(x) (((x)&0xFF00) == 0x8500) |
#define | IS_CMPIMM(x) (((x)&0xFF00) == 0x8800) |
#define | IS_BT(x) (((x)&0xff00) == 0x8900) |
#define | IS_BF(x) (((x)&0xff00) == 0x8B00) |
#define | IS_BTS(x) (((x)&0xff00) == 0x8D00) |
#define | IS_BFS(x) (((x)&0xff00) == 0x8F00) |
#define | IS_BT_OR_BF(x) IS_BT(x) || IS_BTS(x) || IS_BF(x) || IS_BFS(x) |
#define | IS_MOVB_R0_GBRREF(x) (((x)&0xFF00) == 0xC000) |
#define | IS_MOVW_R0_GBRREF(x) (((x)&0xFF00) == 0xC100) |
#define | IS_MOVL_R0_GBRREF(x) (((x)&0xFF00) == 0xC200) |
#define | IS_TRAP(x) (((x)&0xFF00) == 0xC300) |
#define | IS_MOVB_GBRREF_R0(x) (((x)&0xFF00) == 0xC400) |
#define | IS_MOVW_GBRREF_R0(x) (((x)&0xFF00) == 0xC500) |
#define | IS_MOVL_GBRREF_R0(x) (((x)&0xFF00) == 0xC600) |
#define | IS_MOVA_PCREL_R0(x) (((x)&0xFF00) == 0xC700) |
#define | IS_BINLOGIC_IMM_R0(x) (((x)&0xFC00) == 0xC800) |
#define | IS_BINLOGIC_IMM_GBR(x) (((x)&0xFC00) == 0xCC00) |
#define | GET_BRA_OFFSET(x) ((x)&0x0fff) |
#define | GET_BTF_OFFSET(x) ((x)&0x00ff) |
#define | GET_TARGET_REG(x) (((x) >> 8) & 0x0f) |
#define | GET_SOURCE_REG(x) (((x) >> 4) & 0x0f) |
#define | PC_IDX 16 |
Variables | |
static char * | regs [] = { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", "pc" } |
static int(* | first_nibble_decode [])(RzAnalysis *, RzAnalysisOp *, ut16) |
RzAnalysisPlugin | rz_analysis_plugin_sh |
RZ_API RzLibStruct | rizin_plugin |
#define API static |
Definition at line 11 of file analysis_sh.c.
Definition at line 24 of file analysis_sh.c.
#define BYTE_SIZE 1 |
Definition at line 15 of file analysis_sh.c.
#define CLR_T "0xFFFFFFFE,sr,&=" |
Definition at line 29 of file analysis_sh.c.
Definition at line 171 of file analysis_sh.c.
Definition at line 172 of file analysis_sh.c.
Definition at line 176 of file analysis_sh.c.
Definition at line 175 of file analysis_sh.c.
Definition at line 87 of file analysis_sh.c.
Definition at line 88 of file analysis_sh.c.
Definition at line 89 of file analysis_sh.c.
Definition at line 67 of file analysis_sh.c.
Definition at line 154 of file analysis_sh.c.
Definition at line 156 of file analysis_sh.c.
Definition at line 168 of file analysis_sh.c.
Definition at line 167 of file analysis_sh.c.
Definition at line 43 of file analysis_sh.c.
Definition at line 42 of file analysis_sh.c.
Definition at line 153 of file analysis_sh.c.
Definition at line 157 of file analysis_sh.c.
Definition at line 155 of file analysis_sh.c.
Definition at line 38 of file analysis_sh.c.
Definition at line 32 of file analysis_sh.c.
Definition at line 74 of file analysis_sh.c.
Definition at line 77 of file analysis_sh.c.
Definition at line 79 of file analysis_sh.c.
Definition at line 78 of file analysis_sh.c.
Definition at line 76 of file analysis_sh.c.
Definition at line 151 of file analysis_sh.c.
Definition at line 93 of file analysis_sh.c.
Definition at line 94 of file analysis_sh.c.
Definition at line 70 of file analysis_sh.c.
Definition at line 65 of file analysis_sh.c.
Definition at line 36 of file analysis_sh.c.
Definition at line 80 of file analysis_sh.c.
Definition at line 82 of file analysis_sh.c.
Definition at line 81 of file analysis_sh.c.
Definition at line 130 of file analysis_sh.c.
Definition at line 144 of file analysis_sh.c.
Definition at line 92 of file analysis_sh.c.
Definition at line 91 of file analysis_sh.c.
Definition at line 96 of file analysis_sh.c.
Definition at line 98 of file analysis_sh.c.
Definition at line 99 of file analysis_sh.c.
Definition at line 100 of file analysis_sh.c.
Definition at line 95 of file analysis_sh.c.
Definition at line 97 of file analysis_sh.c.
Definition at line 103 of file analysis_sh.c.
Definition at line 104 of file analysis_sh.c.
Definition at line 106 of file analysis_sh.c.
Definition at line 101 of file analysis_sh.c.
Definition at line 102 of file analysis_sh.c.
Definition at line 105 of file analysis_sh.c.
Definition at line 51 of file analysis_sh.c.
Definition at line 90 of file analysis_sh.c.
Definition at line 135 of file analysis_sh.c.
Definition at line 166 of file analysis_sh.c.
Definition at line 163 of file analysis_sh.c.
Definition at line 136 of file analysis_sh.c.
Definition at line 159 of file analysis_sh.c.
Definition at line 146 of file analysis_sh.c.
Definition at line 48 of file analysis_sh.c.
Definition at line 44 of file analysis_sh.c.
Definition at line 58 of file analysis_sh.c.
Definition at line 149 of file analysis_sh.c.
Definition at line 132 of file analysis_sh.c.
Definition at line 165 of file analysis_sh.c.
Definition at line 138 of file analysis_sh.c.
Definition at line 161 of file analysis_sh.c.
Definition at line 50 of file analysis_sh.c.
Definition at line 46 of file analysis_sh.c.
Definition at line 60 of file analysis_sh.c.
Definition at line 134 of file analysis_sh.c.
Definition at line 52 of file analysis_sh.c.
Definition at line 164 of file analysis_sh.c.
Definition at line 137 of file analysis_sh.c.
Definition at line 160 of file analysis_sh.c.
Definition at line 147 of file analysis_sh.c.
Definition at line 49 of file analysis_sh.c.
Definition at line 45 of file analysis_sh.c.
Definition at line 59 of file analysis_sh.c.
Definition at line 150 of file analysis_sh.c.
Definition at line 133 of file analysis_sh.c.
Definition at line 47 of file analysis_sh.c.
Definition at line 73 of file analysis_sh.c.
Definition at line 72 of file analysis_sh.c.
Definition at line 142 of file analysis_sh.c.
Definition at line 143 of file analysis_sh.c.
Definition at line 33 of file analysis_sh.c.
Definition at line 139 of file analysis_sh.c.
Definition at line 69 of file analysis_sh.c.
Definition at line 62 of file analysis_sh.c.
Definition at line 64 of file analysis_sh.c.
Definition at line 63 of file analysis_sh.c.
Definition at line 112 of file analysis_sh.c.
Definition at line 111 of file analysis_sh.c.
Definition at line 113 of file analysis_sh.c.
Definition at line 114 of file analysis_sh.c.
Definition at line 39 of file analysis_sh.c.
Definition at line 34 of file analysis_sh.c.
Definition at line 35 of file analysis_sh.c.
Definition at line 37 of file analysis_sh.c.
Definition at line 123 of file analysis_sh.c.
Definition at line 122 of file analysis_sh.c.
Definition at line 124 of file analysis_sh.c.
Definition at line 41 of file analysis_sh.c.
Definition at line 121 of file analysis_sh.c.
Definition at line 120 of file analysis_sh.c.
Definition at line 126 of file analysis_sh.c.
Definition at line 53 of file analysis_sh.c.
Definition at line 54 of file analysis_sh.c.
Definition at line 55 of file analysis_sh.c.
Definition at line 83 of file analysis_sh.c.
Definition at line 85 of file analysis_sh.c.
Definition at line 86 of file analysis_sh.c.
Definition at line 140 of file analysis_sh.c.
Definition at line 141 of file analysis_sh.c.
#define IS_T "sr,0x1,&," |
Definition at line 27 of file analysis_sh.c.
Definition at line 129 of file analysis_sh.c.
Definition at line 162 of file analysis_sh.c.
Definition at line 66 of file analysis_sh.c.
Definition at line 68 of file analysis_sh.c.
Definition at line 71 of file analysis_sh.c.
#define LONG_SIZE 4 |
Definition at line 13 of file analysis_sh.c.
#define PC_IDX 16 |
Definition at line 179 of file analysis_sh.c.
Definition at line 25 of file analysis_sh.c.
Definition at line 26 of file analysis_sh.c.
#define SET_T "0x1,sr,|=" |
Definition at line 28 of file analysis_sh.c.
#define WORD_SIZE 2 |
Definition at line 14 of file analysis_sh.c.
|
static |
Definition at line 864 of file analysis_sh.c.
References analysis_fill_ai_rg(), analysis_fill_im(), GET_TARGET_REG, RZ_ANALYSIS_OP_TYPE_ADD, rz_strbuf_setf(), and st8.
|
static |
Definition at line 205 of file analysis_sh.c.
References setup::idx, rz_analysis_t::reg, rz_analysis_value_t::reg, regs, RZ_ANALYSIS_VAL_REG, rz_analysis_value_new(), rz_reg_get(), RZ_REG_TYPE_GPR, and rz_analysis_value_t::type.
Referenced by add_imm(), analysis_fill_r0_reg_ref(), analysis_fill_reg_disp_mem(), analysis_fill_reg_ref(), first_nibble_is_0(), first_nibble_is_2(), first_nibble_is_3(), first_nibble_is_4(), first_nibble_is_6(), first_nibble_is_8(), first_nibble_is_c(), mov_imm_reg(), movl_pcdisp_reg(), movl_rdisp_reg(), movl_reg_rdisp(), and movw_pcdisp_reg().
|
static |
Definition at line 212 of file analysis_sh.c.
References rz_analysis_value_t::imm, RZ_ANALYSIS_VAL_IMM, rz_analysis_value_new(), rz_analysis_value_t::type, and v.
Referenced by add_imm(), first_nibble_is_c(), and mov_imm_reg().
|
static |
Definition at line 237 of file analysis_sh.c.
References analysis_fill_ai_rg(), rz_analysis_value_t::memref, reg, rz_analysis_t::reg, rz_analysis_value_t::regdelta, regs, RZ_ANALYSIS_VAL_MEM, rz_reg_get(), RZ_REG_TYPE_GPR, and rz_analysis_value_t::type.
Referenced by first_nibble_is_0().
|
static |
Definition at line 220 of file analysis_sh.c.
References analysis_fill_ai_rg(), delta, rz_analysis_value_t::delta, rz_analysis_value_t::memref, reg, RZ_ANALYSIS_VAL_MEM, and rz_analysis_value_t::type.
Referenced by first_nibble_is_8(), movl_rdisp_reg(), and movl_reg_rdisp().
|
static |
Definition at line 229 of file analysis_sh.c.
References analysis_fill_ai_rg(), rz_analysis_value_t::memref, reg, RZ_ANALYSIS_VAL_MEM, and rz_analysis_value_t::type.
Referenced by first_nibble_is_2(), and first_nibble_is_6().
|
static |
Definition at line 246 of file analysis_sh.c.
References rz_analysis_value_t::base, rz_analysis_value_t::delta, rz_analysis_value_t::memref, RZ_ANALYSIS_VAL_MEM, rz_analysis_value_new(), and rz_analysis_value_t::type.
Referenced by first_nibble_is_c(), and movl_pcdisp_reg().
|
static |
Definition at line 261 of file analysis_sh.c.
References rz_analysis_value_t::base, reg, rz_analysis_t::reg, rz_analysis_value_t::reg, regs, RZ_ANALYSIS_VAL_REG, rz_analysis_value_new(), rz_reg_get(), RZ_REG_TYPE_GPR, and rz_analysis_value_t::type.
Referenced by first_nibble_is_0().
|
static |
|
static |
Definition at line 932 of file analysis_sh.c.
References disarm_12bit_offset(), GET_BRA_OFFSET, PFMT64x, RZ_ANALYSIS_OP_TYPE_JMP, and rz_strbuf_setf().
|
static |
Definition at line 943 of file analysis_sh.c.
References disarm_12bit_offset(), GET_BRA_OFFSET, PFMT64x, RZ_ANALYSIS_OP_TYPE_CALL, and rz_strbuf_setf().
|
static |
Definition at line 182 of file analysis_sh.c.
Definition at line 192 of file analysis_sh.c.
References off, pc, and ut64().
Referenced by first_nibble_is_8().
|
static |
Definition at line 270 of file analysis_sh.c.
References analysis_fill_ai_rg(), analysis_fill_r0_reg_ref(), analysis_regrel_jump(), BYTE_SIZE, GET_SOURCE_REG, GET_TARGET_REG, IS_BRAF, IS_BSRF, IS_CLRMAC, IS_CLRT, IS_DIV0U, IS_MACL, IS_MOVB_R0REL_TO_REG, IS_MOVB_REG_TO_R0REL, IS_MOVL_R0REL_TO_REG, IS_MOVL_REG_TO_R0REL, IS_MOVT, IS_MOVW_R0REL_TO_REG, IS_MOVW_REG_TO_R0REL, IS_MULL, IS_NOP, IS_RTE, IS_RTS, IS_SETT, IS_SLEEP, IS_STCSR1, IS_STSLMACL, IS_STSMACH, IS_STSMACL, IS_STSPR, LONG_SIZE, RZ_ANALYSIS_OP_TYPE_DIV, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_MUL, RZ_ANALYSIS_OP_TYPE_NOP, RZ_ANALYSIS_OP_TYPE_RET, RZ_ANALYSIS_OP_TYPE_STORE, RZ_ANALYSIS_OP_TYPE_UCALL, RZ_ANALYSIS_OP_TYPE_UJMP, RZ_ANALYSIS_OP_TYPE_UNK, rz_strbuf_setf(), S32_EXT, and WORD_SIZE.
|
static |
Definition at line 426 of file analysis_sh.c.
References analysis_fill_ai_rg(), analysis_fill_reg_ref(), BYTE_SIZE, GET_SOURCE_REG, GET_TARGET_REG, IS_AND_REGS, IS_CMPSTR, IS_DIV0S, IS_MOVB_REG_TO_REGREF, IS_MOVL_REG_TO_REGREF, IS_MOVW_REG_TO_REGREF, IS_MULSW, IS_MULUW, IS_OR_REGS, IS_PUSHB, IS_PUSHL, IS_PUSHW, IS_TSTRR, IS_XOR_REGS, IS_XTRCT, LONG_SIZE, RZ_ANALYSIS_OP_TYPE_ACMP, RZ_ANALYSIS_OP_TYPE_AND, RZ_ANALYSIS_OP_TYPE_DIV, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_MUL, RZ_ANALYSIS_OP_TYPE_OR, RZ_ANALYSIS_OP_TYPE_PUSH, RZ_ANALYSIS_OP_TYPE_STORE, RZ_ANALYSIS_OP_TYPE_XOR, rz_strbuf_setf(), S16_EXT, and WORD_SIZE.
|
static |
Definition at line 498 of file analysis_sh.c.
References analysis_fill_ai_rg(), CLR_T, GET_SOURCE_REG, GET_TARGET_REG, IS_ADD, IS_ADDC, IS_ADDV, IS_CMPEQ, IS_CMPGE, IS_CMPGT, IS_CMPHI, IS_CMPHS, IS_DIV1, IS_DMULS, IS_DMULU, IS_SUB, IS_SUBC, IS_SUBV, RZ_ANALYSIS_OP_TYPE_ADD, RZ_ANALYSIS_OP_TYPE_CMP, RZ_ANALYSIS_OP_TYPE_DIV, RZ_ANALYSIS_OP_TYPE_MUL, RZ_ANALYSIS_OP_TYPE_SUB, and rz_strbuf_setf().
|
static |
Definition at line 597 of file analysis_sh.c.
References analysis_fill_ai_rg(), GET_SOURCE_REG, GET_TARGET_REG, IS_CMPPL, IS_CMPPZ, IS_DT, IS_JMP, IS_JSR, IS_LDCGBR, IS_LDCLSR, IS_LDCLSRGBR, IS_LDCLSRVBR, IS_LDCSR, IS_LDCVBR, IS_LDSLMACH, IS_LDSLMACL, IS_LDSLPR, IS_LDSMACH, IS_LDSMACL, IS_LDSPR, IS_MACW, IS_ROTCL, IS_ROTCR, IS_ROTL, IS_ROTR, IS_STCLGBR, IS_STCLSR, IS_STCLVBR, IS_STSLMACH, IS_STSLMACL, IS_STSLPR, IS_TASB, RZ_ANALYSIS_OP_TYPE_CMP, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_MUL, RZ_ANALYSIS_OP_TYPE_POP, RZ_ANALYSIS_OP_TYPE_PUSH, RZ_ANALYSIS_OP_TYPE_RCALL, RZ_ANALYSIS_OP_TYPE_ROL, RZ_ANALYSIS_OP_TYPE_ROR, RZ_ANALYSIS_OP_TYPE_SAL, RZ_ANALYSIS_OP_TYPE_SAR, RZ_ANALYSIS_OP_TYPE_SHL, RZ_ANALYSIS_OP_TYPE_SHR, RZ_ANALYSIS_OP_TYPE_UJMP, RZ_ANALYSIS_OP_TYPE_UNK, rz_strbuf_setf(), and S16_EXT.
|
static |
Definition at line 780 of file analysis_sh.c.
References analysis_fill_ai_rg(), analysis_fill_reg_ref(), BYTE_SIZE, GET_SOURCE_REG, GET_TARGET_REG, IS_EXT, IS_MOV_REGS, IS_MOVB_POP, IS_MOVB_REGREF_TO_REG, IS_MOVL_POP, IS_MOVL_REGREF_TO_REG, IS_MOVW_POP, IS_MOVW_REGREF_TO_REG, IS_NEG, IS_NEGC, IS_NOT, IS_SWAPB, IS_SWAPW, LONG_SIZE, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_NOT, RZ_ANALYSIS_OP_TYPE_POP, RZ_ANALYSIS_OP_TYPE_UNK, rz_strbuf_setf(), and WORD_SIZE.
|
static |
Definition at line 872 of file analysis_sh.c.
References analysis_fill_ai_rg(), analysis_fill_reg_disp_mem(), BYTE_SIZE, disarm_8bit_offset(), GET_BTF_OFFSET, GET_SOURCE_REG, IS_BF, IS_BFS, IS_BT, IS_BT_OR_BF, IS_BTS, IS_CMPIMM, IS_MOVB_R0_REGDISP, IS_MOVB_REGDISP_R0, IS_MOVW_R0_REGDISP, IS_MOVW_REGDISP_R0, PFMT64x, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_ANALYSIS_OP_TYPE_CMP, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_ANALYSIS_OP_TYPE_STORE, rz_strbuf_setf(), and WORD_SIZE.
|
static |
Definition at line 952 of file analysis_sh.c.
References analysis_fill_ai_rg(), analysis_fill_im(), analysis_pcrel_disp_mov(), IS_BINLOGIC_IMM_GBR, IS_BINLOGIC_IMM_R0, IS_MOVA_PCREL_R0, IS_MOVB_GBRREF_R0, IS_MOVB_R0_GBRREF, IS_MOVL_GBRREF_R0, IS_MOVL_R0_GBRREF, IS_MOVW_GBRREF_R0, IS_MOVW_R0_GBRREF, IS_TRAP, LONG_SIZE, RZ_ANALYSIS_OP_TYPE_ACMP, RZ_ANALYSIS_OP_TYPE_AND, RZ_ANALYSIS_OP_TYPE_LEA, RZ_ANALYSIS_OP_TYPE_LOAD, RZ_ANALYSIS_OP_TYPE_OR, RZ_ANALYSIS_OP_TYPE_STORE, RZ_ANALYSIS_OP_TYPE_SWI, RZ_ANALYSIS_OP_TYPE_XOR, rz_strbuf_setf(), and ut8.
|
static |
|
static |
Definition at line 1049 of file analysis_sh.c.
References analysis_fill_ai_rg(), analysis_fill_im(), GET_TARGET_REG, RZ_ANALYSIS_OP_TYPE_MOV, rz_strbuf_setf(), and st8.
|
static |
Definition at line 1038 of file analysis_sh.c.
References analysis_fill_ai_rg(), analysis_pcrel_disp_mov(), GET_TARGET_REG, LONG_SIZE, PFMT64x, RZ_ANALYSIS_OP_TYPE_LOAD, and rz_strbuf_setf().
|
static |
Definition at line 772 of file analysis_sh.c.
References analysis_fill_ai_rg(), analysis_fill_reg_disp_mem(), GET_SOURCE_REG, GET_TARGET_REG, LONG_SIZE, RZ_ANALYSIS_OP_TYPE_LOAD, and rz_strbuf_setf().
|
static |
Definition at line 418 of file analysis_sh.c.
References analysis_fill_ai_rg(), analysis_fill_reg_disp_mem(), GET_SOURCE_REG, GET_TARGET_REG, LONG_SIZE, RZ_ANALYSIS_OP_TYPE_STORE, and rz_strbuf_setf().
|
static |
Definition at line 921 of file analysis_sh.c.
References analysis_fill_ai_rg(), GET_TARGET_REG, PFMT64x, RZ_ANALYSIS_OP_TYPE_LOAD, rz_analysis_value_new(), and rz_strbuf_setf().
|
static |
Definition at line 1116 of file analysis_sh.c.
|
static |
Definition at line 1087 of file analysis_sh.c.
References addr, rz_analysis_t::big_endian, first_nibble_decode, len, RZ_ANALYSIS_OP_TYPE_UNK, RZ_FREE, RZ_NEW0, rz_sh_il_opcode(), and sh_disassembler().
|
static |
Definition at line 1065 of file analysis_sh.c.
Referenced by sh_op().
|
static |
Definition at line 203 of file analysis_sh.c.
Referenced by _extract_regs(), analysis_fill_ai_rg(), analysis_fill_r0_reg_ref(), analysis_regrel_jump(), autocmplt_reg(), avr_custom_des(), esil_peek_some(), esil_poke_some(), exists_reg_list(), fillRegisterValues(), filter(), foreach_reg_set_or_clear(), gdbr_parse_target_xml(), gdbr_write_bin_registers(), get_register_id(), linux_reg_read(), parse_line_raw(), parse_opcodes(), parseReg(), print_line_op(), regs_to_flags(), rz_bin_dwarf_line_header_reset_regs(), rz_bin_dwarf_line_op_run(), rz_core_bin_dwarf_print_line_units(), rz_debug_dmp_reg_read(), rz_il_reg_binding_derive(), rz_il_reg_binding_exactly(), rz_reg_filter_items_covered(), rz_reg_get_list(), rz_xnu_thread_get_gpr(), rz_xnu_thread_set_drx(), rz_xnu_thread_set_gpr(), and store_line_sample().
RZ_API RzLibStruct rizin_plugin |
Definition at line 1200 of file analysis_sh.c.
RzAnalysisPlugin rz_analysis_plugin_sh |
Definition at line 1185 of file analysis_sh.c.