From 169d253e1f25cc4adff6571e249222e422a4b07e Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Fri, 27 Jun 2025 06:22:27 -0700 Subject: [PATCH] tcg/riscv: Fix typo in tgen_extract MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix the direction of the shift, introduced when converting the codebase to TCGOutOp* and small tgen_* helpers. Fixes: 5a4d034f3cb ("tcg: Convert extract to TCGOutOpExtract") Reported-by: Andrea Bolognani Signed-off-by: Richard Henderson Tested-by: Andrea Bolognani Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé --- tcg/riscv/tcg-target.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc index 1800fd5077e..31b9f7d87a0 100644 --- a/tcg/riscv/tcg-target.c.inc +++ b/tcg/riscv/tcg-target.c.inc @@ -2502,7 +2502,7 @@ static void tgen_extract(TCGContext *s, TCGType type, TCGReg a0, TCGReg a1, } } if (ofs + len == 32) { - tgen_shli(s, TCG_TYPE_I32, a0, a1, ofs); + tgen_shri(s, TCG_TYPE_I32, a0, a1, ofs); return; } if (len == 1) { -- 2.47.2