On 25/8/26 17:49, Richard Henderson wrote:
Fixes: 288d39e26d ("tcg: Simplify bswap/hswap expansion using bitswap")
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4229
Signed-off-by: Richard Henderson <[email protected]>
---
  tcg/tcg-op.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
index 28d3b2a847c..2c88f4f7ca9 100644
--- a/tcg/tcg-op.c
+++ b/tcg/tcg-op.c
@@ -1887,7 +1887,7 @@ void tcg_gen_bswap64_i64(TCGv_i64 ret, TCGv_i64 arg)
   */
  void tcg_gen_hswap_i64(TCGv_i64 ret, TCGv_i64 arg)
  {
-    gen_bitswap_i64(ret, ret, 0x0000ffff0000ffffull);
+    gen_bitswap_i64(ret, arg, 0x0000ffff0000ffffull);

I was pretty sure that would be the kind of mistake but missed it :)

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>

      tcg_gen_wswap_i64(ret, ret);
  }


Reply via email to