From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LBg6d-0000KQ-Ci for qemu-devel@nongnu.org; Sat, 13 Dec 2008 20:49:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LBg6a-0000K7-TK for qemu-devel@nongnu.org; Sat, 13 Dec 2008 20:49:14 -0500 Received: from [199.232.76.173] (port=54774 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LBg6a-0000K4-Q7 for qemu-devel@nongnu.org; Sat, 13 Dec 2008 20:49:12 -0500 Received: from mx20.gnu.org ([199.232.41.8]:5430) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LBg6a-0006r5-Fu for qemu-devel@nongnu.org; Sat, 13 Dec 2008 20:49:12 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LBg6Z-0001w1-7p for qemu-devel@nongnu.org; Sat, 13 Dec 2008 20:49:11 -0500 Date: Sat, 13 Dec 2008 17:49:10 -0800 From: Nathan Froyd Message-ID: <20081214014910.GD23471@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH] target-ppc: fix fsel instruction Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Fix fsel instruction. Eliminate unneeded temporaries while we're at it, too. Signed-off-by: Nathan Froyd --- target-ppc/op_helper.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index a9b7f73..92c6269 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -1592,16 +1592,14 @@ uint64_t helper_frsqrte (uint64_t arg) /* fsel - fsel. */ uint64_t helper_fsel (uint64_t arg1, uint64_t arg2, uint64_t arg3) { - CPU_DoubleU farg1, farg2, farg3; + CPU_DoubleU farg1; farg1.ll = arg1; - farg2.ll = arg2; - farg3.ll = arg3; if (!fpisneg(farg1.d) || iszero(farg1.d)) - return farg2.ll; + return arg2; else - return farg2.ll; + return arg3; } uint32_t helper_fcmpu (uint64_t arg1, uint64_t arg2) -- 1.6.0.5