Skip to content

Commit

Permalink
target/i386: speedup JO/SETO after MUL or IMUL
Browse files Browse the repository at this point in the history
OF is equal to the carry flag, so use the same CCPrepare.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
bonzini committed Dec 29, 2023
1 parent 6032627 commit 1e7dde8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions target/i386/tcg/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,9 @@ static CCPrepare gen_prepare_eflags_o(DisasContext *s, TCGv reg)
case CC_OP_CLR:
case CC_OP_POPCNT:
return (CCPrepare) { .cond = TCG_COND_NEVER, .mask = -1 };
case CC_OP_MULB ... CC_OP_MULQ:
return (CCPrepare) { .cond = TCG_COND_NE,
.reg = cpu_cc_src, .mask = -1 };
default:
gen_compute_eflags(s);
return (CCPrepare) { .cond = TCG_COND_NE, .reg = cpu_cc_src,
Expand Down

0 comments on commit 1e7dde8

Please sign in to comment.