Skip to content

Commit

Permalink
Merge branch 'dev' into feature/filtering_La
Browse files Browse the repository at this point in the history
  • Loading branch information
wargio authored Dec 26, 2024
2 parents 6312291 + 42302da commit f7a349a
Show file tree
Hide file tree
Showing 13 changed files with 2,770 additions and 31 deletions.
3 changes: 3 additions & 0 deletions librz/arch/il/analysis_il.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ static void setup_vm_init_state(RzAnalysisILVM *vm, RZ_NULLABLE RzAnalysisILInit
rz_vector_foreach (&is->vars, v) {
rz_il_vm_set_global_var(vm->vm, v->name, rz_il_value_dup(v->val));
}
if (is->cb) {
is->cb(vm, reg);
}
}
}

Expand Down
17 changes: 10 additions & 7 deletions librz/arch/isa/xtensa/xtensa.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ bool xtensa_open(XtensaContext *ctx, const char *cpu, bool big_endian);
bool xtensa_disassemble(XtensaContext *self, const ut8 *buf, int len, ut64 addr);
void xtensa_disassemble_fini(XtensaContext *self);
void xtensa_analyze_op_esil(XtensaContext *ctx, RzAnalysisOp *op);
void xtensa_analyze_op_rzil(XtensaContext *ctx, RzAnalysisOp *op);
RzAnalysisILConfig *xtensa_il_config(RzAnalysis *a);

static inline cs_xtensa_op_mem *xtensa_op_mem(cs_insn *insn, unsigned int index) {
cs_xtensa_op *op = &insn->detail->xtensa.operands[index];
Expand All @@ -56,12 +58,13 @@ static inline int32_t xtensa_op_l32r(cs_insn *insn, unsigned int index) {
return op->imm;
}

#define XOP(I) (ctx->insn->detail->xtensa.operands + I)
#define MEM(I) xtensa_op_mem(ctx->insn, I)
#define REGI(I) xtensa_op_reg(ctx->insn, I)
#define REGN(I) cs_reg_name(ctx->handle, (xtensa_op_reg(ctx->insn, I)))
#define IMM(I) xtensa_op_imm(ctx->insn, I)
#define L32R(I) xtensa_op_l32r(ctx->insn, I)
#define INSN_SIZE (ctx->insn->size)
#define XOP(I) (ctx->insn->detail->xtensa.operands + I)
#define MEM(I) xtensa_op_mem(ctx->insn, I)
#define REGI(I) xtensa_op_reg(ctx->insn, I)
#define REGNAME(I) cs_reg_name(ctx->handle, (I))
#define REGN(I) REGNAME(REGI((I)))
#define IMM(I) xtensa_op_imm(ctx->insn, I)
#define L32R(I) xtensa_op_l32r(ctx->insn, I)
#define INSN_SIZE (ctx->insn->size)

#endif // RZ_XTENSA_H
Loading

0 comments on commit f7a349a

Please sign in to comment.