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 <xtensa-isa.h>
Go to the source code of this file.
Macros | |
#define | CM "," |
#define | XTENSA_MAX_LENGTH 8 |
Typedefs | |
typedef void(* | XtensaOpFn) (RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *buf) |
Variables | |
static XtensaOpFn | xtensa_rst0_fns [] |
static XtensaOpFn | xtensa_rst1_fns [] |
static XtensaOpFn | xtensa_rst2_fns [] |
static XtensaOpFn | xtensa_qrst_fns [] |
static XtensaOpFn | xtensa_lsai_fns [] |
static XtensaOpFn | xtensa_op0_fns [] |
RzAnalysisPlugin | rz_analysis_plugin_xtensa |
RZ_API RzLibStruct | rizin_plugin |
#define CM "," |
Definition at line 12 of file analysis_xtensa.c.
#define XTENSA_MAX_LENGTH 8 |
Definition at line 13 of file analysis_xtensa.c.
typedef void(* XtensaOpFn) (RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8 *buf) |
Definition at line 56 of file analysis_xtensa.c.
|
static |
Definition at line 1796 of file analysis_xtensa.c.
References esil_abs_neg(), esil_add_imm(), esil_add_sub(), esil_bitwise_op(), esil_branch_check_bit(), esil_branch_check_bit_imm(), esil_branch_check_mask(), esil_branch_compare(), esil_branch_compare_imm(), esil_branch_compare_single(), esil_call(), esil_callx(), esil_extract_unsigned(), esil_load_imm(), esil_load_relative(), esil_move(), esil_move_conditional(), esil_move_imm(), esil_set_shift_amount(), esil_set_shift_amount_imm(), esil_shift_logic_imm(), esil_shift_logic_sar(), esil_store_imm(), i, rz_strbuf_setf(), and xtensa_check_stack_op().
Referenced by xtensa_op().
|
static |
Definition at line 1547 of file analysis_xtensa.c.
References CM, i, neg(), rz_strbuf_appendf(), xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 864 of file analysis_xtensa.c.
References CM, dst, esil_push_signed_imm(), i, imm, rz_strbuf_appendf(), sign_extend(), src, st32, xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 1065 of file analysis_xtensa.c.
References CM, dst, i, rz_strbuf_appendf(), shift(), xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 1382 of file analysis_xtensa.c.
References CM, dst, i, rz_strbuf_appendf(), xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 1485 of file analysis_xtensa.c.
References CM, cmp_op, esil_push_signed_imm(), i, rz_strbuf_appendf(), sign_extend(), st32, xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 1428 of file analysis_xtensa.c.
References CM, cmp_op, esil_push_signed_imm(), i, mask, rz_strbuf_appendf(), sign_extend(), st32, xtensa_operand_decode(), xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 1307 of file analysis_xtensa.c.
References branch_imm, CM, compare_op, esil_push_signed_imm(), i, rz_strbuf_append(), rz_strbuf_appendf(), sign_extend(), snprintf, st32, xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 1188 of file analysis_xtensa.c.
References branch_imm, CM, compare_op, esil_push_signed_imm(), i, rz_strbuf_append(), rz_strbuf_appendf(), sign_extend(), st32, xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 1125 of file analysis_xtensa.c.
References branch_imm, CM, compare_op, esil_push_signed_imm(), i, rz_strbuf_appendf(), st32, xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 1250 of file analysis_xtensa.c.
References branch_imm, CM, compare_op, esil_push_signed_imm(), i, rz_strbuf_append(), rz_strbuf_appendf(), sign_extend(), st32, xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 1605 of file analysis_xtensa.c.
References call(), CM, esil_push_signed_imm(), i, rz_strbuf_append(), sign_extend(), st32, and xtensa_operand_get_field().
Referenced by analop_esil().
|
static |
Definition at line 1634 of file analysis_xtensa.c.
References CM, i, rz_strbuf_append(), rz_strbuf_appendf(), xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 1762 of file analysis_xtensa.c.
References CM, i, rz_strbuf_appendf(), xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 756 of file analysis_xtensa.c.
References CM, esil_sign_extend(), i, rz_strbuf_appendf(), xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 825 of file analysis_xtensa.c.
References CM, dst, i, rz_strbuf_appendf(), st32, xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 983 of file analysis_xtensa.c.
References CM, dst, i, rz_strbuf_appendf(), src, xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 1005 of file analysis_xtensa.c.
References CM, compare_op, cond, dst, i, rz_strbuf_appendf(), src, xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 952 of file analysis_xtensa.c.
References CM, esil_push_signed_imm(), i, imm, reg, rz_strbuf_appendf(), sign_extend(), sign_extend2(), st32, xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
Definition at line 722 of file analysis_xtensa.c.
References CM, imm, and rz_strbuf_appendf().
Referenced by esil_add_imm(), esil_branch_check_bit(), esil_branch_check_bit_imm(), esil_branch_check_mask(), esil_branch_compare(), esil_branch_compare_imm(), esil_branch_compare_single(), esil_call(), and esil_move_imm().
|
static |
Definition at line 1659 of file analysis_xtensa.c.
References CM, i, rz_strbuf_appendf(), xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 1675 of file analysis_xtensa.c.
References CM, i, rz_strbuf_appendf(), xtensa_operand_decode(), and xtensa_operand_get_field().
Referenced by analop_esil().
|
static |
Definition at line 1690 of file analysis_xtensa.c.
References CM, i, rz_strbuf_appendf(), xtensa_operand_decode(), xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 1728 of file analysis_xtensa.c.
References CM, i, rz_strbuf_appendf(), xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
Definition at line 735 of file analysis_xtensa.c.
References bit, bit_mask, CM, and rz_strbuf_appendf().
Referenced by esil_load_imm().
|
static |
Definition at line 896 of file analysis_xtensa.c.
References CM, i, rz_strbuf_appendf(), xtensa_operand_get_field(), xtensa_operand_regfile(), and xtensa_regfile_shortname().
Referenced by analop_esil().
|
static |
Definition at line 2006 of file analysis_xtensa.c.
References strdup().
Definition at line 687 of file analysis_xtensa.c.
Referenced by esil_add_imm(), esil_branch_check_bit(), esil_branch_check_bit_imm(), esil_branch_check_mask(), esil_branch_compare(), esil_branch_compare_single(), esil_call(), esil_move_imm(), extract_12(), extract_16(), extract_17(), extract_21(), extract_22(), insn_to_str(), n_oper_to_addr(), and xtensa_check_stack_op().
Definition at line 693 of file analysis_xtensa.c.
References shift(), UT32_MAX, and value.
Referenced by esil_move_imm().
|
static |
Definition at line 292 of file analysis_xtensa.c.
References addr, RZ_ANALYSIS_OP_TYPE_IO, and xtensa_unk_op().
|
static |
|
static |
|
static |
Definition at line 566 of file analysis_xtensa.c.
References addr, RZ_ANALYSIS_OP_TYPE_CJMP, and xtensa_imm8s().
Referenced by xtensa_si_op().
|
static |
Definition at line 560 of file analysis_xtensa.c.
References addr, RZ_ANALYSIS_OP_TYPE_CALL, and xtensa_offset().
|
static |
Definition at line 699 of file analysis_xtensa.c.
References dst, i, imm, RZ_ANALYSIS_STACK_INC, sign_extend(), src, st32, and xtensa_operand_get_field().
Referenced by analop_esil(), and xtensa_op().
|
static |
|
static |
Definition at line 427 of file analysis_xtensa.c.
References addr, RZ_ANALYSIS_OP_FAMILY_FPU, RZ_ANALYSIS_OP_TYPE_ABS, RZ_ANALYSIS_OP_TYPE_ADD, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_MUL, RZ_ANALYSIS_OP_TYPE_NOT, RZ_ANALYSIS_OP_TYPE_SUB, and xtensa_unk_op().
|
static |
Definition at line 474 of file analysis_xtensa.c.
References addr, RZ_ANALYSIS_OP_FAMILY_FPU, RZ_ANALYSIS_OP_TYPE_CMP, RZ_ANALYSIS_OP_TYPE_MOV, and xtensa_unk_op().
|
static |
Definition at line 305 of file analysis_xtensa.c.
References addr, RZ_ANALYSIS_OP_TYPE_NULL, RZ_ANALYSIS_OP_TYPE_RET, and xtensa_unk_op().
|
static |
Definition at line 15 of file analysis_xtensa.c.
References length_table.
Referenced by xtensa_op().
|
static |
Definition at line 70 of file analysis_xtensa.c.
References RZ_ANALYSIS_OP_TYPE_LOAD.
Referenced by xtensa_lsc4_op(), xtensa_lsci_op(), and xtensa_lscx_op().
|
static |
|
static |
Definition at line 396 of file analysis_xtensa.c.
References addr, xtensa_load_op(), xtensa_store_op(), and xtensa_unk_op().
|
static |
Definition at line 546 of file analysis_xtensa.c.
References addr, r, RZ_ANALYSIS_OP_FAMILY_FPU, xtensa_load_op(), xtensa_store_op(), and xtensa_unk_op().
|
static |
Definition at line 410 of file analysis_xtensa.c.
References addr, RZ_ANALYSIS_OP_FAMILY_FPU, xtensa_load_op(), xtensa_store_op(), and xtensa_unk_op().
|
static |
|
static |
Definition at line 66 of file analysis_xtensa.c.
References RZ_ANALYSIS_OP_TYPE_MOV.
|
static |
Definition at line 86 of file analysis_xtensa.c.
References RZ_ANALYSIS_OP_TYPE_MUL.
|
static |
Definition at line 58 of file analysis_xtensa.c.
References RZ_ANALYSIS_OP_TYPE_NULL.
|
static |
Definition at line 1942 of file analysis_xtensa.c.
References addr, analop_esil(), i, len, mask, memcpy(), memset(), NULL, RZ_ANALYSIS_OP_MASK_ESIL, RZ_MIN, xtensa_check_stack_op(), xtensa_default_isa, xtensa_format_decode(), xtensa_format_get_slot(), xtensa_format_num_slots(), xtensa_insnbuf_alloc(), xtensa_insnbuf_from_chars(), xtensa_insnbuf_size(), xtensa_isa_init(), xtensa_length(), XTENSA_MAX_LENGTH, xtensa_op0_fns, xtensa_opcode_decode(), and XTENSA_UNDEFINED.
|
static |
|
static |
|
static |
Definition at line 168 of file analysis_xtensa.c.
References addr, RZ_ANALYSIS_OP_TYPE_RET, and xtensa_unk_op().
Referenced by xtensa_st0_op().
|
static |
|
static |
|
static |
|
static |
Definition at line 257 of file analysis_xtensa.c.
References addr, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_NOT, and xtensa_unk_op().
|
static |
|
static |
|
static |
Definition at line 572 of file analysis_xtensa.c.
References addr, regress::m, n, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_ANALYSIS_OP_TYPE_JMP, RZ_ANALYSIS_OP_TYPE_UPUSH, xtensa_b_op(), xtensa_imm12s(), xtensa_imm18s(), and xtensa_unk_op().
|
static |
Definition at line 123 of file analysis_xtensa.c.
References addr, RZ_ANALYSIS_OP_TYPE_ILL, RZ_ANALYSIS_OP_TYPE_RET, RZ_ANALYSIS_OP_TYPE_UCALL, RZ_ANALYSIS_OP_TYPE_UJMP, and xtensa_unk_op().
Referenced by xtensa_st0_op().
|
static |
Definition at line 194 of file analysis_xtensa.c.
References addr, RZ_ANALYSIS_OP_TYPE_CMOV, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_SWI, RZ_ANALYSIS_OP_TYPE_TRAP, xtensa_rfei_op(), xtensa_snm0_op(), xtensa_sync_op(), and xtensa_unk_op().
|
static |
Definition at line 228 of file analysis_xtensa.c.
References addr, RZ_ANALYSIS_OP_TYPE_IO, RZ_ANALYSIS_OP_TYPE_NULL, RZ_ANALYSIS_OP_TYPE_SWI, and xtensa_unk_op().
|
static |
Definition at line 626 of file analysis_xtensa.c.
References addr, RZ_ANALYSIS_OP_TYPE_CJMP, RZ_ANALYSIS_OP_TYPE_MOV, and xtensa_imm6s().
|
static |
Definition at line 636 of file analysis_xtensa.c.
References addr, RZ_ANALYSIS_OP_TYPE_ILL, RZ_ANALYSIS_OP_TYPE_MOV, RZ_ANALYSIS_OP_TYPE_NOP, RZ_ANALYSIS_OP_TYPE_RET, RZ_ANALYSIS_OP_TYPE_TRAP, and xtensa_unk_op().
|
static |
Definition at line 74 of file analysis_xtensa.c.
References RZ_ANALYSIS_OP_TYPE_STORE.
Referenced by xtensa_lsc4_op(), xtensa_lsci_op(), and xtensa_lscx_op().
|
static |
Definition at line 82 of file analysis_xtensa.c.
References RZ_ANALYSIS_OP_TYPE_SUB.
|
static |
Definition at line 150 of file analysis_xtensa.c.
References addr, RZ_ANALYSIS_OP_TYPE_NULL, and xtensa_unk_op().
Referenced by xtensa_st0_op().
|
static |
Definition at line 272 of file analysis_xtensa.c.
References addr, RZ_ANALYSIS_OP_TYPE_MOV, and xtensa_unk_op().
|
static |
Definition at line 62 of file analysis_xtensa.c.
References RZ_ANALYSIS_OP_TYPE_UNK.
Referenced by xtensa_accer_op(), xtensa_fp0_op(), xtensa_fp1_op(), xtensa_imp_op(), xtensa_lsc4_op(), xtensa_lsci_op(), xtensa_lscx_op(), xtensa_rfei_op(), xtensa_rt0_op(), xtensa_si_op(), xtensa_snm0_op(), xtensa_st0_op(), xtensa_st1_op(), xtensa_st3n_op(), xtensa_sync_op(), and xtensa_tlb_op().
|
static |
RZ_API RzLibStruct rizin_plugin |
Definition at line 2059 of file analysis_xtensa.c.
RzAnalysisPlugin rz_analysis_plugin_xtensa |
Definition at line 2047 of file analysis_xtensa.c.
|
static |
Definition at line 523 of file analysis_xtensa.c.
Referenced by xtensa_lsai_op().
|
static |
Definition at line 667 of file analysis_xtensa.c.
Referenced by xtensa_op().
|
static |
Definition at line 500 of file analysis_xtensa.c.
Referenced by xtensa_qrst_op().
|
static |
Definition at line 328 of file analysis_xtensa.c.
Referenced by xtensa_rst0_op().
|
static |
Definition at line 347 of file analysis_xtensa.c.
Referenced by xtensa_rst1_op().
|
static |
Definition at line 366 of file analysis_xtensa.c.
Referenced by xtensa_rst2_op().