From patchwork Fri Mar 27 21:17:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. Murphy" X-Patchwork-Id: 38635 Return-Path: X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id D547B3885C2F for ; Fri, 27 Mar 2020 21:18:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D547B3885C2F Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02RL3OBK145696 for ; Fri, 27 Mar 2020 17:18:04 -0400 Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ywd2vhvcg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 27 Mar 2020 17:18:04 -0400 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 02RLGkLD002821 for ; Fri, 27 Mar 2020 21:18:03 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma03wdc.us.ibm.com with ESMTP id 2ywawan7xy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 27 Mar 2020 21:18:03 +0000 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 02RLI3Al45154740 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 27 Mar 2020 21:18:03 GMT Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2251613604F for ; Fri, 27 Mar 2020 21:18:03 +0000 (GMT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 967A1136051 for ; Fri, 27 Mar 2020 21:18:02 +0000 (GMT) Received: from brokenarrow.ibmuc.com (unknown [9.85.139.44]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP for ; Fri, 27 Mar 2020 21:18:02 +0000 (GMT) From: "Paul E. Murphy" To: libc-alpha@sourceware.org Subject: [PATCH v2 00/10] IEEE binary128 long double on powerpc64le Date: Fri, 27 Mar 2020 16:17:51 -0500 Message-Id: <20200327211801.31234-1-murphyp@linux.vnet.ibm.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.645 definitions=2020-03-27_07:2020-03-27, 2020-03-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 suspectscore=1 spamscore=0 mlxscore=0 adultscore=0 priorityscore=1501 malwarescore=0 phishscore=0 mlxlogscore=999 bulkscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003270169 X-Spam-Status: No, score=-15.3 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2020 21:18:09 -0000 New for V2: Several preparatory patches have been merged, and three new patches are added. Notably, GCC 7.5.x is blacklisted as it cannot handle both -mabi=* and -mlong-double-128 being passed without error. Update install.texi and regenerate INSTALL per feedback from JSM. Cleanup some ugly loose ends in the ldbl-128ibm iscanonical.h, and add documentation to, and rename __LONG_DOUBLE_USES_FLOAT128 to __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI. The final 4 patches should be committed simultaneously, and will be tested against the cross product of the following GCC versions and CPU targets. {power8, power9, powerpc64le} x { GCC 7.3, 8.4, 9.3} ---8<--- This shuffles the powerpc64le Makefile around to support building and testing the new long double format. I consider this support experimental as GNU libstc++ has some growing pains to make -mfloat128 and -mabi=ieeelongdouble play nicely togethor, and the runtime symbol selection may also need some improvement (i.e dlopen/dlsym). Nevertheless, this is the start to making this feature available. The first 3 patches fixup internal headers to ensure local PLT usage works, and C++ tests continue to work. Something changed between g++ 8 and 9 which prevents the redirects from working unless the headers are marked as system headers. The majority of the powerpc64le patches refactor the common ppc64le Makefile to ensure the correct ldouble/float128 compiler flags are applied when -mabi=ieeelongdouble is applied globally, as should be the case in some future release. Notably, the only explicit user of long double internally is difftime. Gabriel F. T. Gomes (1): powerpc64le: Enable support for IEEE long double Paul E. Murphy (9): ldbl-128ibm-compat: workaround C++ redirect limitations ldbl-128ibm: simplify iscanonical.h Rename __LONG_DOUBLE_USES_FLOAT128 to powerpc64le: Enforce -mabi=ibmlongdouble when -mfloat128 used powerpc64le: workaround ieee long double / _Float128 stdc++ bug powerpc64le: raise GCC requirement to 7.3 for long double transition powerpc64le: bump binutils version requirement to >= 2.26 powerpc64le: enforce non-specific long double in .gnu.attributes section powerpc64le: blacklist broken GCC compilers (e.g GCC 7.5.0) INSTALL | 9 ++ NEWS | 8 +- argp/argp.h | 2 +- bits/long-double.h | 15 +- elf/tst-addr1.c | 2 +- include/math.h | 6 +- include/monetary.h | 8 + include/printf.h | 8 + include/stdio.h | 16 +- include/stdlib.h | 11 +- include/sys/cdefs.h | 2 +- include/wchar.h | 9 ++ libio/bits/stdio-ldbl.h | 4 +- libio/stdio.h | 8 +- manual/install.texi | 9 ++ math/complex.h | 4 +- math/math.h | 12 +- math/test-ldouble.h | 2 +- misc/err.h | 2 +- misc/error.h | 2 +- misc/sys/cdefs.h | 4 +- misc/sys/syslog.h | 2 +- stdio-common/printf.h | 2 +- stdio-common/tst-vfprintf-user-type.c | 2 +- stdlib/bits/stdlib-ldbl.h | 2 +- stdlib/monetary.h | 2 +- stdlib/stdlib.h | 2 +- sysdeps/ieee754/ldbl-128/bits/long-double.h | 2 +- sysdeps/ieee754/ldbl-128ibm-compat/Makefile | 12 -- .../ldbl-128ibm-compat/bits/long-double.h | 7 +- .../ieee754/ldbl-128ibm-compat/math_ldbl.h | 2 +- .../ieee754/ldbl-128ibm/bits/iscanonical.h | 10 +- sysdeps/ieee754/ldbl-128ibm/ieee754.h | 6 +- .../ldbl-128ibm/include/bits/iscanonical.h | 2 +- sysdeps/ieee754/ldbl-96/bits/long-double.h | 2 +- sysdeps/ieee754/ldbl-opt/bits/long-double.h | 2 +- sysdeps/mips/ieee754/bits/long-double.h | 2 +- sysdeps/powerpc/fpu/libm-test-ulps | 4 + sysdeps/powerpc/powerpc64/le/Implies-before | 1 + sysdeps/powerpc/powerpc64/le/Makefile | 130 ++++++++++----- sysdeps/powerpc/powerpc64/le/configure | 151 ++++++++++++++++++ sysdeps/powerpc/powerpc64/le/configure.ac | 56 +++++++ .../powerpc64/le/fpu/multiarch/Makefile | 4 +- .../powerpc64/le/no_ldbl_gnu_attribute.c | 30 ++++ .../powerpc64/le/ldbl-128ibm-compat-abi.h | 8 + .../linux/powerpc/powerpc64/le/libc.abilist | 93 +++++++++++ .../linux/powerpc/powerpc64/le/libm.abilist | 117 ++++++++++++++ .../linux/sparc/sparc32/bits/long-double.h | 2 +- .../linux/sparc/sparc64/bits/long-double.h | 2 +- wcsmbs/bits/wchar-ldbl.h | 4 +- wcsmbs/wchar.h | 8 +- 51 files changed, 691 insertions(+), 121 deletions(-) create mode 100644 sysdeps/powerpc/powerpc64/le/no_ldbl_gnu_attribute.c create mode 100644 sysdeps/unix/sysv/linux/powerpc/powerpc64/le/ldbl-128ibm-compat-abi.h