Skip to content

Commit

Permalink
v850: fix jump target
Browse files Browse the repository at this point in the history
  • Loading branch information
imbillow committed Feb 2, 2024
1 parent fcc973e commit 32b8ed3
Show file tree
Hide file tree
Showing 2 changed files with 205 additions and 197 deletions.
6 changes: 3 additions & 3 deletions librz/analysis/p/analysis_v850.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static int v850_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8
break;
case V850_JARL:
op->type = RZ_ANALYSIS_OP_TYPE_CALL;
op->jump = addr + inst.disp;
op->jump = addr + (st32)(inst.disp);
op->fail = addr + inst.byte_size;
break;
case V850_SWITCH:
Expand All @@ -119,7 +119,7 @@ static int v850_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8
break;
case V850_JR:
op->type = RZ_ANALYSIS_OP_TYPE_JMP;
op->jump = addr + inst.disp;
op->jump = addr + (st32)(inst.disp);
op->fail = addr + inst.byte_size;
break;
case V850_OR:
Expand Down Expand Up @@ -176,7 +176,7 @@ static int v850_op(RzAnalysis *analysis, RzAnalysisOp *op, ut64 addr, const ut8
op->type = RZ_ANALYSIS_OP_TYPE_SHL;
break;
case V850_BCOND:
op->jump = addr + inst.disp;
op->jump = addr + (st32)(inst.disp);
op->fail = addr + inst.byte_size;
op->type = RZ_ANALYSIS_OP_TYPE_CJMP;
break;
Expand Down
Loading

0 comments on commit 32b8ed3

Please sign in to comment.