From patchwork Fri Dec 4 04:03:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Meissner X-Patchwork-Id: 1410824 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=kvqsF6Hv; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CnJwb4p9jz9sT5 for ; Fri, 4 Dec 2020 15:03:42 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D87C9384B823; Fri, 4 Dec 2020 04:03:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D87C9384B823 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1607054618; bh=p8W8zQe+Tp7kD45fPt2wDTg1yWZlNtKaiwvQnhWTzxE=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=kvqsF6HvJsvnkZeDc1QYqSajn8Wi4o/1N9x9pR3S7V+DrISIOnZYx7aMoqCPLO5lk 6SIr3rx/J/FvSQAtvr44M0L1UWj0w+9f/HcLWvmX5r50639qhbsfsRptLYD6LCfyW2 etY9g72+J0LKOKCzNnZmJFic2AcGxAQxLTLWjrno= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 6EA0F384B823 for ; Fri, 4 Dec 2020 04:03:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6EA0F384B823 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B43arKw034533; Thu, 3 Dec 2020 23:03:35 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 357d37rw48-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Dec 2020 23:03:34 -0500 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0B43u8Ib096686; Thu, 3 Dec 2020 23:03:34 -0500 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 357d37rw3s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 03 Dec 2020 23:03:34 -0500 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0B43laHg022754; Fri, 4 Dec 2020 04:03:33 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma01dal.us.ibm.com with ESMTP id 355rf828mv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 04 Dec 2020 04:03:33 +0000 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0B443WOY9634436 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 4 Dec 2020 04:03:32 GMT Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3D10D6A04D; Fri, 4 Dec 2020 04:03:32 +0000 (GMT) Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 80ED36A047; Fri, 4 Dec 2020 04:03:31 +0000 (GMT) Received: from ibm-toto.the-meissners.org (unknown [9.160.117.152]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTPS; Fri, 4 Dec 2020 04:03:31 +0000 (GMT) Date: Thu, 3 Dec 2020 23:03:29 -0500 To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn , Bill Schmidt , Peter Bergner Subject: [PATCH 3/3] PowerPC: Force IBM long double for conversion test. Message-ID: <20201204040329.GC24930@ibm-toto.the-meissners.org> Mail-Followup-To: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , David Edelsohn , Bill Schmidt , Peter Bergner References: <20201204034123.GA23641@ibm-toto.the-meissners.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201204034123.GA23641@ibm-toto.the-meissners.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-12-04_01:2020-12-03, 2020-12-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 mlxscore=0 spamscore=0 adultscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 mlxlogscore=999 clxscore=1015 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012040019 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Michael Meissner via Gcc-patches From: Michael Meissner Reply-To: Michael Meissner Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" PowerPC: Force IBM long double for conversion test. This patch replaces the following patch: | Date: Sat, 21 Nov 2020 00:39:53 -0500 | Subject: [PATCH 3/3] PowerPC: Require IBM long double for conversion test. | Message-ID: <20201121053953.GE17995@ibm-toto.the-meissners.org> | https://gcc.gnu.org/pipermail/gcc-patches/2020-November/559841.html The test c-c++-common/dfp/convert-bfp-11.c explicitly expects long double to use the IBM 128-bit extended double format. In particular, some of the tests expect an infinity to be created if decimal values that are converted that are too large for IBM extended double. However, the numbers do fit in the range for IEEE 128-bit format, since it has a larger exponent than the IBM 128-bit format. The test fails because an infinity is not generated. This patch uses the target support option that says we can change the long double type. If the long double type uses the IBM format, you can use older GLIBCs. If you are using IEEE long doubles, this test will only run if GLIBC is 2.32 or newer that supports switching the long double format. I have checked this patch with 3 compilers built on a little endian power9 system, 1 compiler with IBM default long double, 1 compiler with IEEE default long double, and 1 compiler with 64-bit long double. This test passes with all 3 compilers. Can I check this patch into the master branch? gcc/testsuite/ 2020-12-03 Michael Meissner * c-c++-common/dfp/convert-bfp-11.c: Force using IBM 128-bit long double. Remove check for 64-bit long double. --- .../c-c++-common/dfp/convert-bfp-11.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c b/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c index 95c433d2c24..d19d6aa9220 100644 --- a/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c +++ b/gcc/testsuite/c-c++-common/dfp/convert-bfp-11.c @@ -1,9 +1,14 @@ -/* { dg-skip-if "" { ! "powerpc*-*-linux*" } } */ +/* { dg-require-effective-target dfp } */ +/* { dg-require-effective-target ppc_long_double_override_ibm } */ +/* { dg-options "-O2 -mlong-double-128 -mabi=ibmlongdouble -Wno-psabi" } */ -/* Test decimal float conversions to and from IBM 128-bit long double. - Checks are skipped at runtime if long double is not 128 bits. - Don't force 128-bit long doubles because runtime support depends - on glibc. */ +/* We force the long double type to be IBM 128-bit because the CONVERT_TO_PINF + tests will fail if we use IEEE 128-bit floating point. This is due to IEEE + 128-bit having a larger exponent range than IBM 128-bit extended double. So + tests that would generate an infinity with IBM 128-bit will generate a + normal number with IEEE 128-bit. */ + +/* Test decimal float conversions to and from IBM 128-bit long double. */ #include "convert.h" @@ -36,9 +41,6 @@ CONVERT_TO_PINF (312, tf, sd, 1.6e+308L, d32) int main () { - if (sizeof (long double) != 16) - return 0; - convert_101 (); convert_102 ();