Message ID | 20201204225953.2755588-1-f4bug@amsat.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | target/mips: Simplify gen_msa_BxZ() 'if' condition | expand |
diff --git a/target/mips/translate.c b/target/mips/translate.c index 8a35d4d0d03..112a5becfbb 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -28778,9 +28778,7 @@ static bool gen_msa_BxZ(DisasContext *ctx, int df, int wt, int s16, bool if_not) } gen_check_zero_element(bcond, df, wt); - if (if_not) { - tcg_gen_setcondi_tl(TCG_COND_EQ, bcond, bcond, 0); - } + tcg_gen_xori_tl(bcond, bcond, if_not); ctx->btarget = ctx->base.pc_next + (s16 << 2) + 4; ctx->hflags |= MIPS_HFLAG_BC;
As gen_check_zero_element() already produces a boolean, replace 'if (x) tcg_gen_setcondi_tl()' by tcg_gen_xori_tl(x) which already contains the if (x). Suggested-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- Based-on: <20201202184415.1434484-1-f4bug@amsat.org> --- target/mips/translate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)