]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tcg/arm: Fix tgen_deposit
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 29 Aug 2025 13:49:06 +0000 (13:49 +0000)
committerRichard Henderson <richard.henderson@linaro.org>
Thu, 4 Sep 2025 07:48:08 +0000 (09:48 +0200)
When converting from tcg_out_deposit, the arguments were not
shuffled properly.

Cc: qemu-stable@nongnu.org
Fixes: cf4905c03135f1181e8 ("tcg: Convert deposit to TCGOutOpDeposit")
Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Tested-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tcg/arm/tcg-target.c.inc

index 836894b16ade756e8145f83c812a8e9a90800ae6..338c57b061631ecd19ce9fc2b18a4575f6abf81d 100644 (file)
@@ -975,7 +975,8 @@ static void tgen_deposit(TCGContext *s, TCGType type, TCGReg a0, TCGReg a1,
                          TCGReg a2, unsigned ofs, unsigned len)
 {
     /* bfi/bfc */
-    tcg_out32(s, 0x07c00010 | (COND_AL << 28) | (a0 << 12) | a1
+    tcg_debug_assert(a0 == a1);
+    tcg_out32(s, 0x07c00010 | (COND_AL << 28) | (a0 << 12) | a2
               | (ofs << 7) | ((ofs + len - 1) << 16));
 }