From patchwork Fri Feb 10 07:23:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bharata B Rao X-Patchwork-Id: 9566057 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 51628602B6 for ; Fri, 10 Feb 2017 07:33:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D1DE2852A for ; Fri, 10 Feb 2017 07:33:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 304B828532; Fri, 10 Feb 2017 07:33:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C4E3C2852A for ; Fri, 10 Feb 2017 07:33:29 +0000 (UTC) Received: from localhost ([::1]:42336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cc5hw-00078g-DR for patchwork-qemu-devel@patchwork.kernel.org; Fri, 10 Feb 2017 02:33:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cc5ZK-0007QI-Ld for qemu-devel@nongnu.org; Fri, 10 Feb 2017 02:24:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cc5ZH-0000PB-Fw for qemu-devel@nongnu.org; Fri, 10 Feb 2017 02:24:34 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:42964) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cc5ZH-0000Oo-6L for qemu-devel@nongnu.org; Fri, 10 Feb 2017 02:24:31 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v1A7NbVq009887 for ; Fri, 10 Feb 2017 02:24:30 -0500 Received: from e23smtp06.au.ibm.com (e23smtp06.au.ibm.com [202.81.31.148]) by mx0a-001b2d01.pphosted.com with ESMTP id 28h2df52y8-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 10 Feb 2017 02:24:29 -0500 Received: from localhost by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 10 Feb 2017 17:24:27 +1000 Received: from d23dlp01.au.ibm.com (202.81.31.203) by e23smtp06.au.ibm.com (202.81.31.212) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 10 Feb 2017 17:24:25 +1000 Received: from d23relay07.au.ibm.com (d23relay07.au.ibm.com [9.190.26.37]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 2C6182CE8054; Fri, 10 Feb 2017 18:24:25 +1100 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay07.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v1A7OHLr35324068; Fri, 10 Feb 2017 18:24:25 +1100 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v1A7Nqq4023929; Fri, 10 Feb 2017 18:23:52 +1100 Received: from bharata.in.ibm.com ([9.77.205.48]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v1A7NYCw023032; Fri, 10 Feb 2017 18:23:50 +1100 From: Bharata B Rao To: qemu-devel@nongnu.org Date: Fri, 10 Feb 2017 12:53:11 +0530 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486711391-12247-1-git-send-email-bharata@linux.vnet.ibm.com> References: <1486711391-12247-1-git-send-email-bharata@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17021007-0040-0000-0000-000002EDFF38 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17021007-0041-0000-0000-00000C38378C Message-Id: <1486711391-12247-8-git-send-email-bharata@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-02-10_02:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702100074 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH 7/7] target-s390: Use float128_to_uint[64/32] where required 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: nikunj@linux.vnet.ibm.com, Christian Borntraeger , qemu-ppc@nongnu.org, Bharata B Rao , Cornelia Huck , david@gibson.dropbear.id.au, rth@twiddle.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Use float126_to_uint[64/32] instead of using int versions of the same. Signed-off-by: Bharata B Rao CC: Christian Borntraeger CC: Cornelia Huck --- target/s390x/fpu_helper.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/s390x/fpu_helper.c b/target/s390x/fpu_helper.c index e604e9f..9aa94d9 100644 --- a/target/s390x/fpu_helper.c +++ b/target/s390x/fpu_helper.c @@ -515,8 +515,7 @@ uint64_t HELPER(clgxb)(CPUS390XState *env, uint64_t h, uint64_t l, uint32_t m3) { int hold = swap_round_mode(env, m3); float128 v2 = make_float128(h, l); - /* ??? Not 100% correct. */ - uint64_t ret = float128_to_int64(v2, &env->fpu_status); + uint64_t ret = float128_to_uint64(v2, &env->fpu_status); set_float_rounding_mode(hold, &env->fpu_status); handle_exceptions(env, GETPC()); return ret; @@ -547,8 +546,7 @@ uint64_t HELPER(clfxb)(CPUS390XState *env, uint64_t h, uint64_t l, uint32_t m3) { int hold = swap_round_mode(env, m3); float128 v2 = make_float128(h, l); - /* Not 100% correct. */ - uint32_t ret = float128_to_int64(v2, &env->fpu_status); + uint32_t ret = float128_to_uint32(v2, &env->fpu_status); set_float_rounding_mode(hold, &env->fpu_status); handle_exceptions(env, GETPC()); return ret;