tcg/mips: Conditionalize tcg_out_exts_i32_i64

Since TCG_TYPE_I32 values are kept sign-extended in registers, we need not
extend if the register matches.  This is already relied upon by comparisons.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2023-04-05 18:40:44 -07:00
parent 341ac0a055
commit c6a98619f7
1 changed files with 3 additions and 1 deletions

View File

@ -582,7 +582,9 @@ static void tcg_out_ext32s(TCGContext *s, TCGReg rd, TCGReg rs)
static void tcg_out_exts_i32_i64(TCGContext *s, TCGReg rd, TCGReg rs)
{
tcg_out_ext32s(s, rd, rs);
if (rd != rs) {
tcg_out_ext32s(s, rd, rs);
}
}
static void tcg_out_extu_i32_i64(TCGContext *s, TCGReg rd, TCGReg rs)