From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QllFE-0003ey-Fo for garchives@archives.gentoo.org; Tue, 26 Jul 2011 17:16:36 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6741921C254; Tue, 26 Jul 2011 17:16:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 3024B21C254 for ; Tue, 26 Jul 2011 17:16:14 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AB0611B4023 for ; Tue, 26 Jul 2011 17:16:13 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 9594580042 for ; Tue, 26 Jul 2011 17:16:12 +0000 (UTC) From: "Doug Goldstein" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Doug Goldstein" Message-ID: Subject: [gentoo-commits] proj/qemu-kvm:qemu-kvm-0.13.0-gentoo commit in: target-arm/ X-VCS-Repository: proj/qemu-kvm X-VCS-Files: target-arm/translate.c X-VCS-Directories: target-arm/ X-VCS-Committer: cardoe X-VCS-Committer-Name: Doug Goldstein X-VCS-Revision: e485959b33e1abdfa16f05e800de9edaad924b09 Date: Tue, 26 Jul 2011 17:16:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: d2fa3d6580a77b972fc347b00bfdade3 commit: e485959b33e1abdfa16f05e800de9edaad924b09 Author: Aurelien Jarno aurel32 net> AuthorDate: Mon Dec 27 18:54:49 2010 +0000 Commit: Doug Goldstein gentoo org> CommitDate: Fri May 27 18:02:02 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/qemu-kvm.git;= a=3Dcommit;h=3De485959b target-arm: fix bug in translation of REVSH The translation of REVSH shifted the low byte 8 steps left before perform= ing an 8-bit sign extend, causing this part of the expression to alwas be 0. Reported-by: Johan Bengtsson gmail.com> Signed-off-by: Aurelien Jarno aurel32.net> (cherry picked from commit 1a855029af40df40144a322bba0e1e61c68eed2a) Signed-off-by: Aurelien Jarno aurel32.net> --- target-arm/translate.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index 6fcdd7e..cb19dd7 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -250,13 +250,9 @@ static void gen_rev16(TCGv var) /* Byteswap low halfword and sign extend. */ static void gen_revsh(TCGv var) { - TCGv tmp =3D new_tmp(); - tcg_gen_shri_i32(tmp, var, 8); - tcg_gen_andi_i32(tmp, tmp, 0x00ff); - tcg_gen_shli_i32(var, var, 8); - tcg_gen_ext8s_i32(var, var); - tcg_gen_or_i32(var, var, tmp); - dead_tmp(tmp); + tcg_gen_ext16u_i32(var, var); + tcg_gen_bswap16_i32(var, var); + tcg_gen_ext16s_i32(var, var); } =20 /* Unsigned bitfield extract. */