From nobody Sat Jul 12 15:32:37 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1486015899441370.82960581553334; Wed, 1 Feb 2017 22:11:39 -0800 (PST) Received: from localhost ([::1]:54516 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZAcJ-0003bw-7V for importer@patchew.org; Thu, 02 Feb 2017 01:11:35 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZ9k5-0007iL-Ak for qemu-devel@nongnu.org; Thu, 02 Feb 2017 00:15:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZ9jz-00044m-Ct for qemu-devel@nongnu.org; Thu, 02 Feb 2017 00:15:33 -0500 Received: from ozlabs.org ([103.22.144.67]:57599) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cZ9jy-0003zc-TD; Thu, 02 Feb 2017 00:15:27 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 3vDSqV2sqJz9s8S; Thu, 2 Feb 2017 16:14:59 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1486012502; bh=vslhaqlhfs9Fx9H6djumL+8vcrkNLco7fOT9vT3S3UA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=n0xqLXNTOIEw9z2foyKt8n/Pfk69XStxoT4eLLOLtnIaEhYQt0YD3Dy2VTcRqyG0c GYMFy+GI8HEPJr/QaHdnms+1AAeLWZHf2hzOwT3N2poRXYENg19yU7j1ROCoukG/YI ssmbP/8jdtPHAgXusdzTV/JOCaOlF1xGen1+yWoY= From: David Gibson To: peter.maydell@linaro.org Date: Thu, 2 Feb 2017 16:13:53 +1100 Message-Id: <20170202051445.5735-56-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170202051445.5735-1-david@gibson.dropbear.id.au> References: <20170202051445.5735-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 103.22.144.67 Subject: [Qemu-devel] [PULL 055/107] target-ppc: Use correct precision for FPRF setting X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, thuth@redhat.com, Nikunj A Dadhania , qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, agraf@suse.de, aik@ozlabs.ru, qemu-ppc@nongnu.org, Bharata B Rao , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Bharata B Rao Use correct FP precision when setting FPRF in FP conversion helpers instead of always assuming float64 precision. Signed-off-by: Bharata B Rao Signed-off-by: Nikunj A Dadhania Signed-off-by: David Gibson --- target/ppc/fpu_helper.c | 4 ++-- target/ppc/internal.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c index f4103f5..01b335f 100644 --- a/target/ppc/fpu_helper.c +++ b/target/ppc/fpu_helper.c @@ -109,6 +109,7 @@ void helper_compute_fprf_##tp(CPUPPCState *env, tp arg)= \ } =20 COMPUTE_FPRF(float16) +COMPUTE_FPRF(float32) COMPUTE_FPRF(float64) =20 /* Floating-point invalid operations exception */ @@ -2652,8 +2653,7 @@ void helper_##op(CPUPPCState *env, uint32_t opcode) = \ xt.tfld =3D ttp##_snan_to_qnan(xt.tfld); \ } \ if (sfprf) { \ - helper_compute_fprf_float64(env, ttp##_to_float64(xt.tfld, \ - &env->fp_status)); \ + helper_compute_fprf_##ttp(env, xt.tfld); \ } \ } \ \ diff --git a/target/ppc/internal.h b/target/ppc/internal.h index 1e27209..187f024 100644 --- a/target/ppc/internal.h +++ b/target/ppc/internal.h @@ -244,4 +244,5 @@ static inline void putVSR(int n, ppc_vsr_t *vsr, CPUPPC= State *env) } =20 void helper_compute_fprf_float16(CPUPPCState *env, float16 arg); +void helper_compute_fprf_float32(CPUPPCState *env, float32 arg); #endif /* PPC_INTERNAL_H */ --=20 2.9.3