Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
imbillow committed Jan 24, 2024
1 parent ca2f3eb commit b2ba7ab
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions librz/asm/arch/v850/v850_disas.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,9 @@ static bool decode_formatIV_2(V850_Inst *inst) {
}

static bool decode_formatV(V850_Inst *inst) {
if (inst->w2 & 1) {
return false;
}
inst->opcode = get_opcode(inst, 6, 10);
inst->reg2 = get_reg2(inst);
inst->disp = get_disp22(inst);
Expand Down Expand Up @@ -392,22 +395,22 @@ static bool decode_formatVII(V850_Inst *inst) {
case 0x38: inst->id = V850_LDB; break;
case 0x3a: inst->id = V850_STB; break;
case 0x3b:
if (!(inst->w2 & 1)) {
if (!(inst->sub_opcode)) {
inst->id = V850_STH;
} else {
inst->id = V850_STW;
}
inst->disp &= ~1;
break;
case 0x3e: {
if (inst->w2 & 1) {
if (inst->sub_opcode) {
inst->id = V850_LDBU;
break;
}
return false;
}
case 0x39: {
if (!(inst->w2 & 1)) {
if (!(inst->sub_opcode)) {
inst->id = V850_LDH;
} else {
inst->id = V850_LDW;
Expand Down Expand Up @@ -757,7 +760,7 @@ static bool decode_formatXIII(V850_Inst *inst) {
inst->list = get_list(inst);
inst->reg2 = inst->w2 & 0x1f;

if (inst->sub_opcode == 0) {
if (inst->sub_opcode != 0) {
return false;
}

Expand Down

0 comments on commit b2ba7ab

Please sign in to comment.