return cond_make_tt(c, t0, t1);
}
-static void cond_free(DisasCond *cond)
-{
- switch (cond->c) {
- default:
- cond->a0 = NULL;
- cond->a1 = NULL;
- /* fallthru */
- case TCG_COND_ALWAYS:
- cond->c = TCG_COND_NEVER;
- break;
- case TCG_COND_NEVER:
- break;
- }
-}
-
static TCGv_i64 load_gpr(DisasContext *ctx, unsigned reg)
{
if (reg == 0) {
tcg_gen_brcond_i64(ctx->null_cond.c, ctx->null_cond.a0,
ctx->null_cond.a1, ctx->null_lab);
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
}
}
ctx->null_cond.a0, ctx->null_cond.a1);
ctx->psw_n_nonzero = true;
}
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
}
/* Set a PSW[N] to X. The intention is that this is used immediately
save_gpr(ctx, rt, dest);
/* Install the new nullification. */
- cond_free(&ctx->null_cond);
ctx->null_cond = cond;
}
save_gpr(ctx, rt, dest);
/* Install the new nullification. */
- cond_free(&ctx->null_cond);
ctx->null_cond = cond;
}
save_gpr(ctx, rt, dest);
/* Install the new nullification. */
- cond_free(&ctx->null_cond);
ctx->null_cond = cond;
}
save_gpr(ctx, rt, dest);
/* Install the new nullification. */
- cond_free(&ctx->null_cond);
- if (cf) {
- ctx->null_cond = do_log_cond(ctx, cf, d, dest);
- }
+ ctx->null_cond = do_log_cond(ctx, cf, d, dest);
}
static bool do_log_reg(DisasContext *ctx, arg_rrr_cf_d *a,
}
save_gpr(ctx, rt, dest);
- cond_free(&ctx->null_cond);
ctx->null_cond = cond;
}
taken = gen_new_label();
tcg_gen_brcond_i64(c, cond->a0, cond->a1, taken);
- cond_free(cond);
/* Not taken: Condition not satisfied; nullify on backward branches. */
n = is_n && disp < 0;
static bool trans_nop(DisasContext *ctx, arg_nop *a)
{
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
return true;
}
/* No point in nullifying the memory barrier. */
tcg_gen_mb(TCG_BAR_SC | TCG_MO_ALL);
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
return true;
}
tcg_gen_andi_i64(dest, dest, -4);
save_gpr(ctx, a->t, dest);
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
return true;
}
save_gpr(ctx, rt, t0);
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
return true;
}
save_gpr(ctx, rt, tmp);
done:
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
return true;
}
tcg_gen_andi_i64(tmp, reg, ctx->is_pa20 ? 63 : 31);
save_or_nullify(ctx, cpu_sar, tmp);
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
return true;
}
tcg_gen_andi_i64(tmp, tmp, ctx->is_pa20 ? 63 : 31);
save_or_nullify(ctx, cpu_sar, tmp);
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
return true;
}
#endif
save_gpr(ctx, a->t, dest);
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
return true;
}
tcg_gen_add_i64(dest, src1, src2);
save_gpr(ctx, a->b, dest);
}
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
return true;
}
since the entire address space is coherent. */
save_gpr(ctx, a->t, ctx->zero);
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
return true;
}
unsigned rt = a->t;
if (rt == 0) { /* NOP */
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
return true;
}
if (r2 == 0) { /* COPY */
} else {
save_gpr(ctx, rt, cpu_gr[r1]);
}
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
return true;
}
#ifndef CONFIG_USER_ONLY
tcg_gen_xor_i64(dest, tcg_r1, tcg_r2);
save_gpr(ctx, a->t, dest);
- cond_free(&ctx->null_cond);
- if (a->cf) {
- ctx->null_cond = do_unit_zero_cond(a->cf, a->d, dest);
- }
-
+ ctx->null_cond = do_unit_zero_cond(a->cf, a->d, dest);
return nullify_end(ctx);
}
tcg_gen_subi_i64(tmp, tmp, 1);
}
save_gpr(ctx, a->t, tmp);
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
return true;
}
tcg_gen_movi_i64(tcg_rt, a->i);
save_gpr(ctx, a->t, tcg_rt);
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
return true;
}
tcg_gen_addi_i64(tcg_r1, tcg_rt, a->i);
save_gpr(ctx, 1, tcg_r1);
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
return true;
}
tcg_gen_addi_i64(tcg_rt, cpu_gr[a->b], a->i);
}
save_gpr(ctx, a->t, tcg_rt);
- cond_free(&ctx->null_cond);
+ ctx->null_cond = cond_make_f();
return true;
}
save_gpr(ctx, a->t, dest);
/* Install the new nullification. */
- cond_free(&ctx->null_cond);
- if (a->c) {
- ctx->null_cond = do_sed_cond(ctx, a->c, a->d, dest);
- }
+ ctx->null_cond = do_sed_cond(ctx, a->c, a->d, dest);
return nullify_end(ctx);
}
save_gpr(ctx, a->t, dest);
/* Install the new nullification. */
- cond_free(&ctx->null_cond);
- if (a->c) {
- ctx->null_cond = do_sed_cond(ctx, a->c, a->d, dest);
- }
+ ctx->null_cond = do_sed_cond(ctx, a->c, a->d, dest);
return nullify_end(ctx);
}
save_gpr(ctx, a->t, dest);
/* Install the new nullification. */
- cond_free(&ctx->null_cond);
- if (a->c) {
- ctx->null_cond = do_sed_cond(ctx, a->c, a->d, dest);
- }
+ ctx->null_cond = do_sed_cond(ctx, a->c, a->d, dest);
return nullify_end(ctx);
}
save_gpr(ctx, a->t, dest);
/* Install the new nullification. */
- cond_free(&ctx->null_cond);
- if (a->c) {
- ctx->null_cond = do_sed_cond(ctx, a->c, a->d, dest);
- }
+ ctx->null_cond = do_sed_cond(ctx, a->c, a->d, dest);
return nullify_end(ctx);
}
save_gpr(ctx, a->t, dest);
/* Install the new nullification. */
- cond_free(&ctx->null_cond);
- if (a->c) {
- ctx->null_cond = do_sed_cond(ctx, a->c, a->d, dest);
- }
+ ctx->null_cond = do_sed_cond(ctx, a->c, a->d, dest);
return nullify_end(ctx);
}
save_gpr(ctx, a->t, dest);
/* Install the new nullification. */
- cond_free(&ctx->null_cond);
- if (a->c) {
- ctx->null_cond = do_sed_cond(ctx, a->c, a->d, dest);
- }
+ ctx->null_cond = do_sed_cond(ctx, a->c, a->d, dest);
return nullify_end(ctx);
}
save_gpr(ctx, rt, dest);
/* Install the new nullification. */
- cond_free(&ctx->null_cond);
- if (c) {
- ctx->null_cond = do_sed_cond(ctx, c, d, dest);
- }
+ ctx->null_cond = do_sed_cond(ctx, c, d, dest);
return nullify_end(ctx);
}