Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tcg/i386: Conditionalize tcg_out_extu_i32_i64
Since TCG_TYPE_I32 values are kept zero-extended in registers, via
omission of the REXW bit, we need not extend if the register matches.
This is already relied upon by qemu_{ld,st}.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed May 16, 2023
1 parent 2aea77c commit 757604b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tcg/i386/tcg-target.c.inc
Expand Up @@ -1315,7 +1315,9 @@ static void tcg_out_exts_i32_i64(TCGContext *s, TCGReg dest, TCGReg src)

static void tcg_out_extu_i32_i64(TCGContext *s, TCGReg dest, TCGReg src)
{
tcg_out_ext32u(s, dest, src);
if (dest != src) {
tcg_out_ext32u(s, dest, src);
}
}

static void tcg_out_extrl_i64_i32(TCGContext *s, TCGReg dest, TCGReg src)
Expand Down

0 comments on commit 757604b

Please sign in to comment.