From patchwork Sun Jan 2 14:39:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 77183 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AE58DB7082 for ; Mon, 3 Jan 2011 01:41:14 +1100 (EST) Received: from localhost ([127.0.0.1]:38032 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZP7O-0007zG-9J for incoming@patchwork.ozlabs.org; Sun, 02 Jan 2011 09:41:10 -0500 Received: from [140.186.70.92] (port=49774 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZP6N-0007xv-4q for qemu-devel@nongnu.org; Sun, 02 Jan 2011 09:40:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PZP6K-0001Qf-Ej for qemu-devel@nongnu.org; Sun, 02 Jan 2011 09:40:06 -0500 Received: from hall.aurel32.net ([88.191.126.93]:54819) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PZP6J-0001QM-RQ for qemu-devel@nongnu.org; Sun, 02 Jan 2011 09:40:04 -0500 Received: from farad.aurel32.net ([82.232.2.251] helo=volta.aurel32.net) by hall.aurel32.net with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1PZP6I-000726-PV; Sun, 02 Jan 2011 15:40:02 +0100 Received: from aurel32 by volta.aurel32.net with local (Exim 4.72) (envelope-from ) id 1PZP6G-00074m-Nb; Sun, 02 Jan 2011 15:40:00 +0100 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Sun, 2 Jan 2011 15:39:42 +0100 Message-Id: <1293979183-27108-3-git-send-email-aurelien@aurel32.net> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1293979183-27108-1-git-send-email-aurelien@aurel32.net> References: <1293979183-27108-1-git-send-email-aurelien@aurel32.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Alexander Graf , Aurelien Jarno Subject: [Qemu-devel] [PATCH 2/3] target-ppc: fix default qNaN X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org On PPC the default qNaN doesn't have the sign bit set. Cc: Alexander Graf Signed-off-by: Aurelien Jarno Acked-by: Alexander Graf --- target-ppc/op_helper.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c index 858877e..279f345 100644 --- a/target-ppc/op_helper.c +++ b/target-ppc/op_helper.c @@ -643,7 +643,7 @@ static inline uint64_t fload_invalid_op_excp(int op) env->fpscr &= ~((1 << FPSCR_FR) | (1 << FPSCR_FI)); if (ve == 0) { /* Set the result to quiet NaN */ - ret = 0xFFF8000000000000ULL; + ret = 0x7FF8000000000000ULL; env->fpscr &= ~(0xF << FPSCR_FPCC); env->fpscr |= 0x11 << FPSCR_FPCC; } @@ -654,7 +654,7 @@ static inline uint64_t fload_invalid_op_excp(int op) env->fpscr &= ~((1 << FPSCR_FR) | (1 << FPSCR_FI)); if (ve == 0) { /* Set the result to quiet NaN */ - ret = 0xFFF8000000000000ULL; + ret = 0x7FF8000000000000ULL; env->fpscr &= ~(0xF << FPSCR_FPCC); env->fpscr |= 0x11 << FPSCR_FPCC; }