Skip to content

Commit

Permalink
v850: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
imbillow committed Jan 25, 2024
1 parent b27f3ad commit a9fcc26
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
19 changes: 10 additions & 9 deletions librz/analysis/arch/v850/v850_il.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,13 @@ static RzAnalysisLiftedILOp lift_jarl(const V850AnalysisContext *ctx) {
JMP(VARL("_pc")));
}

static RzAnalysisLiftedILOp lift_reti(const V850AnalysisContext *ctx) {
return SEQ4(
SETL("_cnd", OR(PSW_EP, INV(PSW_NP))),
SETL("_pc", ITE(VARL("_cnd"), VARG("EIPC"), VARG("FEPC"))),
SETL("PSW", ITE(VARL("_cnd"), VARG("EIPSW"), VARG("FEPSW"))),
JMP(VARL("_pc")));
}
// static RzAnalysisLiftedILOp lift_reti(const V850AnalysisContext *ctx) {
// return SEQ4(
// SETL("_cnd", OR(PSW_EP, INV(PSW_NP))),
// SETL("_pc", ITE(VARL("_cnd"), VARG("EIPC"), VARG("FEPC"))),
// SETL("PSW", ITE(VARL("_cnd"), VARG("EIPSW"), VARG("FEPSW"))),
// JMP(VARL("_pc")));
// }

static RzAnalysisLiftedILOp lift_ld(const V850AnalysisContext *ctx, RzILOpPure *addr, unsigned B) {
RzILOpPure *y = LOADW(B, VARL("_adr"));
Expand Down Expand Up @@ -494,8 +494,9 @@ RzAnalysisLiftedILOp v850_il_op(const V850AnalysisContext *ctx) {
case V850_SHL: return lift_op2(ctx, R2V, R1V, shl0);
case V850_SHR: return lift_op2(ctx, R2V, R1V, shr0);
case V850_SAR: return lift_op2(ctx, R2V, R1V, rz_il_op_new_shiftr_arith);
case V850_HALT: return NOP();
// case V850_RETI: return lift_reti(ctx);
case V850_HALT:
return NOP();
// case V850_RETI: return lift_reti(ctx);
case V850_SETF: return SETG(R2, ITE(condition_table(EXT_COND), U32((1)), U32(0)));
case V850_STSR: return SETG(R2, VARG(SR_get(regID, selID)));
case V850_LDSR: return SETG(SR_get(ctx->x->w1 >> 11, selID), VARG(R1));
Expand Down
3 changes: 0 additions & 3 deletions librz/asm/arch/v850/v850_disas.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,9 +574,6 @@ static bool decode_formatIX(V850_Inst *inst) {
} else if (extract(inst->sub_opcode, 4, 7) == 0x09 ||
extract(inst->sub_opcode, 4, 7) == 0x0b ||
extract(inst->sub_opcode, 4, 7) == 0x0d) {
ut8 msb_ = extract(inst->sub_opcode, 12, 4);
ut8 lsb_ = extract(inst->sub_opcode, 1, 3) | extract(inst->sub_opcode, 11, 1) << 3;
// TODO:
inst->id = V850_BINS;
} else {
return false;
Expand Down

0 comments on commit a9fcc26

Please sign in to comment.