Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Functions | |
RZ_IPI int | rz_arm_cs_analysis_op_32_esil (RzAnalysis *a, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len, csh *handle, cs_insn *insn, bool thumb) |
RZ_IPI int | rz_arm_cs_analysis_op_64_esil (RzAnalysis *a, RzAnalysisOp *op, ut64 addr, const ut8 *buf, int len, csh *handle, cs_insn *insn) |
RZ_IPI const char * | rz_arm_cs_esil_prefix_cond (RzAnalysisOp *op, int cond_type) |
RZ_IPI RzILOpEffect * | rz_arm_cs_32_il (csh *handle, cs_insn *insn, bool thumb) |
RZ_IPI RzAnalysisILConfig * | rz_arm_cs_32_il_config (bool big_endian) |
RZ_IPI RzILOpEffect * | rz_arm_cs_64_il (csh *handle, cs_insn *insn) |
RZ_IPI RzAnalysisILConfig * | rz_arm_cs_64_il_config (bool big_endian) |
RZ_IPI RzILOpEffect* rz_arm_cs_32_il | ( | csh * | handle, |
cs_insn * | insn, | ||
bool | thumb | ||
) |
Definition at line 2647 of file arm_il32.c.
References ARM_INS_IT, BRANCH, c, cond(), handle, il_unconditional(), NOP, and NULL.
Referenced by analysis_op().
RZ_IPI RzAnalysisILConfig* rz_arm_cs_32_il_config | ( | bool | big_endian | ) |
Definition at line 2667 of file arm_il32.c.
References EFFECT_LABEL_SYSCALL, rz_il_effect_label_t::hook, label_hvc(), label_svc(), r, regs_bound_32, rz_analysis_il_config_add_label(), rz_analysis_il_config_new(), and rz_il_effect_label_new().
Referenced by il_config().
RZ_IPI RzILOpEffect* rz_arm_cs_64_il | ( | csh * | handle, |
cs_insn * | insn | ||
) |
Lift an AArch64 instruction to RzIL
Currently unimplemented:
Plausible to represent by adding another memory with a 60bit keys and 4bit values to hold the memory tags. Instructions:
Extremely complex internal calculations. Different options to implement it include:
Definition at line 2316 of file arm_il64.c.
References add_sub(), adr(), ARM64_INS_ADC, ARM64_INS_ADD, ARM64_INS_ADR, ARM64_INS_ADRP, ARM64_INS_AND, ARM64_INS_ASR, ARM64_INS_B, ARM64_INS_BFI, ARM64_INS_BFM, ARM64_INS_BFXIL, ARM64_INS_BIC, ARM64_INS_BL, ARM64_INS_BLR, ARM64_INS_BR, ARM64_INS_CBNZ, ARM64_INS_CBZ, ARM64_INS_CCMN, ARM64_INS_CCMP, ARM64_INS_CINC, ARM64_INS_CINV, ARM64_INS_CLS, ARM64_INS_CLZ, ARM64_INS_CMN, ARM64_INS_CMP, ARM64_INS_CNEG, ARM64_INS_CSEL, ARM64_INS_CSET, ARM64_INS_CSETM, ARM64_INS_CSINC, ARM64_INS_CSINV, ARM64_INS_CSNEG, ARM64_INS_EON, ARM64_INS_EOR, ARM64_INS_EXTR, ARM64_INS_HINT, ARM64_INS_HVC, ARM64_INS_LDAR, ARM64_INS_LDARB, ARM64_INS_LDARH, ARM64_INS_LDAXP, ARM64_INS_LDAXR, ARM64_INS_LDAXRB, ARM64_INS_LDAXRH, ARM64_INS_LDNP, ARM64_INS_LDP, ARM64_INS_LDPSW, ARM64_INS_LDR, ARM64_INS_LDRB, ARM64_INS_LDRH, ARM64_INS_LDRSB, ARM64_INS_LDRSH, ARM64_INS_LDRSW, ARM64_INS_LDTR, ARM64_INS_LDTRB, ARM64_INS_LDTRH, ARM64_INS_LDTRSB, ARM64_INS_LDTRSH, ARM64_INS_LDTRSW, ARM64_INS_LDUR, ARM64_INS_LDURB, ARM64_INS_LDURH, ARM64_INS_LDURSB, ARM64_INS_LDURSH, ARM64_INS_LDURSW, ARM64_INS_LDXP, ARM64_INS_LDXR, ARM64_INS_LDXRB, ARM64_INS_LDXRH, ARM64_INS_LSL, ARM64_INS_LSR, ARM64_INS_MADD, ARM64_INS_MNEG, ARM64_INS_MOV, ARM64_INS_MOVK, ARM64_INS_MOVN, ARM64_INS_MOVZ, ARM64_INS_MRS, ARM64_INS_MSR, ARM64_INS_MSUB, ARM64_INS_MUL, ARM64_INS_MVN, ARM64_INS_NEG, ARM64_INS_NEGS, ARM64_INS_NGC, ARM64_INS_NGCS, ARM64_INS_NOP, ARM64_INS_ORN, ARM64_INS_ORR, ARM64_INS_PRFM, ARM64_INS_PRFUM, ARM64_INS_RBIT, ARM64_INS_RET, ARM64_INS_REV, ARM64_INS_REV16, ARM64_INS_REV32, ARM64_INS_ROR, ARM64_INS_SBC, ARM64_INS_SBFIZ, ARM64_INS_SBFX, ARM64_INS_SDIV, ARM64_INS_SEV, ARM64_INS_SEVL, ARM64_INS_SMADDL, ARM64_INS_SMNEGL, ARM64_INS_SMSUBL, ARM64_INS_SMULH, ARM64_INS_SMULL, ARM64_INS_STLR, ARM64_INS_STLRB, ARM64_INS_STLRH, ARM64_INS_STLXP, ARM64_INS_STLXR, ARM64_INS_STLXRB, ARM64_INS_STLXRH, ARM64_INS_STNP, ARM64_INS_STP, ARM64_INS_STR, ARM64_INS_STRB, ARM64_INS_STRH, ARM64_INS_STTR, ARM64_INS_STTRB, ARM64_INS_STTRH, ARM64_INS_STUR, ARM64_INS_STURB, ARM64_INS_STURH, ARM64_INS_STXP, ARM64_INS_STXR, ARM64_INS_STXRB, ARM64_INS_STXRH, ARM64_INS_SUB, ARM64_INS_SVC, ARM64_INS_SXTB, ARM64_INS_SXTH, ARM64_INS_SXTW, ARM64_INS_TBNZ, ARM64_INS_TBZ, ARM64_INS_TST, ARM64_INS_UBFIZ, ARM64_INS_UBFX, ARM64_INS_UDIV, ARM64_INS_UMADDL, ARM64_INS_UMNEGL, ARM64_INS_UMSUBL, ARM64_INS_UMULH, ARM64_INS_UMULL, ARM64_INS_UXTB, ARM64_INS_UXTH, ARM64_INS_WFE, ARM64_INS_WFI, ARM64_INS_YIELD, bfm(), bic(), bitwise(), bl(), branch(), cbz(), cls(), clz(), cmp(), cset(), csinc(), extr(), hvc(), INV, ldr(), madd(), mov(), movk(), movn(), mrs(), msr(), mul(), mvn(), NOP, NULL, rbit(), rev(), sbfx(), sdiv(), SETG, shift(), smaddl(), smulh(), smull(), str(), svc(), sxt(), tbz(), tst(), udiv(), and VARG.
Referenced by analysis_op().
RZ_IPI RzAnalysisILConfig* rz_arm_cs_64_il_config | ( | bool | big_endian | ) |
Definition at line 2762 of file arm_il64.c.
References EFFECT_LABEL_SYSCALL, rz_il_effect_label_t::hook, label_hvc(), label_svc(), r, regs_bound, rz_analysis_il_config_add_label(), rz_analysis_il_config_new(), and rz_il_effect_label_new().
Referenced by il_config().
RZ_IPI int rz_arm_cs_analysis_op_32_esil | ( | RzAnalysis * | a, |
RzAnalysisOp * | op, | ||
ut64 | addr, | ||
const ut8 * | buf, | ||
int | len, | ||
csh * | handle, | ||
cs_insn * | insn, | ||
bool | thumb | ||
) |
Definition at line 239 of file arm_esil32.c.
References addr, ARG, ARM_INS_ADC, ARM_INS_ADD, ARM_INS_ADDW, ARM_INS_ADR, ARM_INS_AND, ARM_INS_ASR, ARM_INS_B, ARM_INS_BFC, ARM_INS_BFI, ARM_INS_BIC, ARM_INS_BKPT, ARM_INS_BL, ARM_INS_BLX, ARM_INS_BX, ARM_INS_BXJ, ARM_INS_CBNZ, ARM_INS_CBZ, ARM_INS_CLZ, ARM_INS_CMN, ARM_INS_CMP, ARM_INS_EOR, ARM_INS_IT, ARM_INS_LDM, ARM_INS_LDMDA, ARM_INS_LDMDB, ARM_INS_LDMIB, ARM_INS_LDR, ARM_INS_LDRB, ARM_INS_LDRBT, ARM_INS_LDRD, ARM_INS_LDREX, ARM_INS_LDREXB, ARM_INS_LDREXD, ARM_INS_LDREXH, ARM_INS_LDRH, ARM_INS_LDRHT, ARM_INS_LDRSB, ARM_INS_LDRSBT, ARM_INS_LDRSH, ARM_INS_LDRSHT, ARM_INS_LDRT, ARM_INS_LSL, ARM_INS_LSR, ARM_INS_MLA, ARM_INS_MLS, ARM_INS_MOV, ARM_INS_MOVT, ARM_INS_MOVW, ARM_INS_MRS, ARM_INS_MSR, ARM_INS_MUL, ARM_INS_MVN, ARM_INS_NOP, ARM_INS_ORN, ARM_INS_ORR, ARM_INS_POP, ARM_INS_PUSH, ARM_INS_REV, ARM_INS_REV16, ARM_INS_REVSH, ARM_INS_RSB, ARM_INS_SADD16, ARM_INS_SADD8, ARM_INS_SBC, ARM_INS_SMMLA, ARM_INS_SMMLAR, ARM_INS_SSUB16, ARM_INS_SSUB8, ARM_INS_STM, ARM_INS_STMDA, ARM_INS_STMDB, ARM_INS_STMIB, ARM_INS_STR, ARM_INS_STRB, ARM_INS_STRBT, ARM_INS_STRD, ARM_INS_STRH, ARM_INS_STRHT, ARM_INS_STRT, ARM_INS_SUB, ARM_INS_SUBW, ARM_INS_SVC, ARM_INS_SXTB, ARM_INS_SXTH, ARM_INS_TBB, ARM_INS_TBH, ARM_INS_TST, ARM_INS_UBFX, ARM_INS_UDF, ARM_INS_UMULL, ARM_INS_UXTB, ARM_INS_VLDMDB, ARM_INS_VLDMIA, ARM_INS_VMOV, ARM_INS_VSTMDB, ARM_INS_VSTMIA, ARM_REG_PC, ARM_SFT_ASR, ARM_SFT_LSL, ARM_SFT_LSR, ARM_SFT_ROR, ARM_SFT_RRX, HASMEMINDEX, i, IMM, ISIMM, ISMEM, ISMEMINDEXSUB, ISPOSTINDEX32, ISPREINDEX32, ISREG, ISSHIFTED, lr, LSHIFT2, mask, MATH32, MATH32_NEG, MATH32AS, MEMBASE, MEMDISP, MEMINDEX, NULL, OPCOUNT, pc, PFMT32u, PFMT64u, PFMT64x, r0, r1, r4, r5, r6, r7, REG, REGBASE, REGID, REGSIZE32, RZ_ANALYSIS_OP_FAMILY_THREAD, rz_arm_cs_esil_prefix_cond(), rz_num_bitmask(), rz_strbuf_append(), rz_strbuf_appendf(), rz_strbuf_init(), rz_strbuf_set(), rz_strbuf_setf(), shift(), SHIFTTYPE, SHIFTVALUE, sp, cmd_descs_generate::str, UT16_MAX, UT32_MAX, ut64(), and width.
Referenced by analysis_op().
RZ_IPI int rz_arm_cs_analysis_op_64_esil | ( | RzAnalysis * | a, |
RzAnalysisOp * | op, | ||
ut64 | addr, | ||
const ut8 * | buf, | ||
int | len, | ||
csh * | handle, | ||
cs_insn * | insn | ||
) |
Definition at line 202 of file arm_esil64.c.
References ARM64_INS_ADC, ARM64_INS_ADD, ARM64_INS_ADR, ARM64_INS_ADRP, ARM64_INS_AND, ARM64_INS_ASR, ARM64_INS_B, ARM64_INS_BFI, ARM64_INS_BFXIL, ARM64_INS_BIC, ARM64_INS_BL, ARM64_INS_BLR, ARM64_INS_BR, ARM64_INS_CBNZ, ARM64_INS_CBZ, ARM64_INS_CCMN, ARM64_INS_CCMP, ARM64_INS_CINC, ARM64_INS_CLZ, ARM64_INS_CMN, ARM64_INS_CMP, ARM64_INS_CSEL, ARM64_INS_CSET, ARM64_INS_CSINC, ARM64_INS_EON, ARM64_INS_EOR, ARM64_INS_ERET, ARM64_INS_EXTR, ARM64_INS_FCMP, ARM64_INS_FCSEL, ARM64_INS_FDIV, ARM64_INS_FMADD, ARM64_INS_LDAR, ARM64_INS_LDARB, ARM64_INS_LDARH, ARM64_INS_LDAXR, ARM64_INS_LDAXRB, ARM64_INS_LDAXRH, ARM64_INS_LDP, ARM64_INS_LDR, ARM64_INS_LDRB, ARM64_INS_LDRH, ARM64_INS_LDRSB, ARM64_INS_LDRSH, ARM64_INS_LDRSW, ARM64_INS_LDUR, ARM64_INS_LDURB, ARM64_INS_LDURH, ARM64_INS_LDURSB, ARM64_INS_LDURSH, ARM64_INS_LDURSW, ARM64_INS_LDXR, ARM64_INS_LDXRB, ARM64_INS_LDXRH, ARM64_INS_LSL, ARM64_INS_LSR, ARM64_INS_MADD, ARM64_INS_MNEG, ARM64_INS_MOV, ARM64_INS_MOVK, ARM64_INS_MOVN, ARM64_INS_MOVZ, ARM64_INS_MSUB, ARM64_INS_MUL, ARM64_INS_MVN, ARM64_INS_NEG, ARM64_INS_NEGS, ARM64_INS_NOP, ARM64_INS_ORN, ARM64_INS_ORR, ARM64_INS_RBIT, ARM64_INS_RET, ARM64_INS_REV, ARM64_INS_REV16, ARM64_INS_REV32, ARM64_INS_ROR, ARM64_INS_SBC, ARM64_INS_SBFIZ, ARM64_INS_SBFX, ARM64_INS_SDIV, ARM64_INS_SMADDL, ARM64_INS_SMULL, ARM64_INS_STNP, ARM64_INS_STP, ARM64_INS_STR, ARM64_INS_STRB, ARM64_INS_STRH, ARM64_INS_STUR, ARM64_INS_STURB, ARM64_INS_STURH, ARM64_INS_STXR, ARM64_INS_STXRB, ARM64_INS_STXRH, ARM64_INS_SUB, ARM64_INS_SVC, ARM64_INS_SXTB, ARM64_INS_SXTH, ARM64_INS_SXTW, ARM64_INS_TBNZ, ARM64_INS_TBZ, ARM64_INS_TST, ARM64_INS_UBFIZ, ARM64_INS_UBFX, ARM64_INS_UDIV, ARM64_INS_UMADDL, ARM64_INS_UMULL, ARM64_INS_UXTB, ARM64_INS_UXTH, arm64_reg_width(), bits(), DECODE_SHIFT64, EXT64, HASMEMINDEX64, i2, IMM64, int, ISIMM64, ISMEM64, ISPOSTINDEX64, ISPREINDEX64, ISREG64, LSHIFT2_64, mask, MEMBASE64, MEMDISP64, MEMINDEX64, NULL, OPCALL, OPCALL_NEG, OPCOUNT64, PFMT64d, PFMT64u, PFMT64x, r0, r1, r2, REG64, REGID64, REGSIZE64, rz_arm_cs_esil_prefix_cond(), rz_num_bitmask(), rz_strbuf_append(), rz_strbuf_appendf(), rz_strbuf_init(), rz_strbuf_set(), rz_strbuf_setf(), shift(), SHIFTED_REG64_APPEND, st64, ut64(), and val.
Referenced by analysis_op().
RZ_IPI const char* rz_arm_cs_esil_prefix_cond | ( | RzAnalysisOp * | op, |
int | cond_type | ||
) |
Definition at line 63 of file arm_esil32.c.
References ARM_CC_AL, ARM_CC_EQ, ARM_CC_GE, ARM_CC_GT, ARM_CC_HI, ARM_CC_HS, ARM_CC_LE, ARM_CC_LO, ARM_CC_LS, ARM_CC_LT, ARM_CC_MI, ARM_CC_NE, ARM_CC_PL, ARM_CC_VC, ARM_CC_VS, and rz_strbuf_setf().
Referenced by rz_arm_cs_analysis_op_32_esil(), and rz_arm_cs_analysis_op_64_esil().