From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uj7l4-0007hy-JL for qemu-devel@nongnu.org; Sun, 02 Jun 2013 08:51:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uj7l2-0002D1-Gi for qemu-devel@nongnu.org; Sun, 02 Jun 2013 08:51:38 -0400 Received: from ozlabs.org ([203.10.76.45]:53649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uj7Oh-0003yT-5E for qemu-devel@nongnu.org; Sun, 02 Jun 2013 08:28:31 -0400 Date: Sun, 2 Jun 2013 22:28:27 +1000 From: Anton Blanchard Message-ID: <20130602222827.620d5762@kryten> In-Reply-To: <20130602222452.1b0fdbd1@kryten> References: <20130602222452.1b0fdbd1@kryten> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 2/4] tcg-ppc64: bswap64 rotates output 32 bits List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: david@gibson.dropbear.id.au, agraf@suse.de, rth@twiddle.net, aurelien@aurel32.net Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.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 --- diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index 0fcf2b5..64fb0af 100644 --- a/tcg/ppc64/tcg-target.c +++ b/tcg/ppc64/tcg-target.c @@ -1922,8 +1922,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;