Skip to content

Commit

Permalink
fix xtensa_cs
Browse files Browse the repository at this point in the history
  • Loading branch information
imbillow committed Dec 15, 2024
1 parent de4a7e4 commit ae0a570
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions librz/arch/p/analysis/analysis_xtensa_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,11 @@ static void xop_to_rval(RzAnalysis *a, XtensaContext *ctx, cs_xtensa_op *xop, Rz
static void xtensa_analyze_op(RzAnalysis *a, RzAnalysisOp *op, XtensaContext *ctx) {
int src_count = 0;
for (int i = 0; i < ctx->insn->detail->xtensa.op_count; ++i) {
if (src_count >= RZ_ARRAY_SIZE(op->src)) {
rz_warn_if_reached();
break;
}

cs_xtensa_op *xop = XOP(i);
if (xop->access & CS_AC_WRITE) {
xop_to_rval(a, ctx, xop, &op->dst);
Expand Down
2 changes: 1 addition & 1 deletion librz/include/rz_analysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ typedef struct rz_analysis_op_t {
st64 stackptr; /* stack pointer */
int refptr; /* if (0) ptr = "reference" else ptr = "load memory of refptr bytes" */
ut64 mmio_address; // mmio address
RzAnalysisValue *src[6];
RzAnalysisValue *src[8];
RzAnalysisValue *dst;
RzList /*<RzAnalysisValue *>*/ *access; /* RzAnalysisValue access information */
RzStrBuf esil;
Expand Down

0 comments on commit ae0a570

Please sign in to comment.