]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tcg/riscv: Fix typo in tgen_extract
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 27 Jun 2025 13:22:27 +0000 (06:22 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 30 Jun 2025 13:42:38 +0000 (07:42 -0600)
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 <abologna@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Andrea Bolognani <abologna@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
tcg/riscv/tcg-target.c.inc

index 1800fd5077ecc893475fd91a6edab02fd3df9496..31b9f7d87a0468463959cdb97b2a55d218d4b812 100644 (file)
@@ -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) {