Patchwork [PULL,2/4] tcg-ppc64: bswap64 rotates output 32 bits

login
register
mail settings
Submitter Richard Henderson
Date June 17, 2013, 5:45 p.m.
Message ID <1371491129-30246-3-git-send-email-rth@twiddle.net>
Download mbox | patch
Permalink /patch/252018/
State New
Headers show

Comments

Richard Henderson - June 17, 2013, 5:45 p.m.
From: Anton Blanchard <anton@samba.org>

If our input and output is in the same register, bswap64 tries to
undo a rotate of the input. This just ends up rotating the output.

Cc: qemu-stable@nongnu.org
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 tcg/ppc64/tcg-target.c | 2 --
 1 file changed, 2 deletions(-)

Patch

diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
index c7c0b8f..1d06530 100644
--- a/tcg/ppc64/tcg-target.c
+++ b/tcg/ppc64/tcg-target.c
@@ -1923,8 +1923,6 @@  static void tcg_out_op (TCGContext *s, TCGOpcode opc, const TCGArg *args,
 
         if (a0 == 0) {
             tcg_out_mov(s, TCG_TYPE_I64, args[0], a0);
-            /* Revert the source rotate that we performed above.  */
-            tcg_out_rld(s, RLDICL, a1, a1, 32, 0);
         }
         break;