From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 040753857B8D; Tue, 28 Jun 2022 08:35:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 040753857B8D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.92,227,1650960000"; d="scan'208";a="80626864" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 28 Jun 2022 00:35:09 -0800 IronPort-SDR: 5bozO/xl29KnDCR4stecBLXyaCUhJ0PuERwiO8JQ1laey5x+tRUJu9s+5ZV0T2SOYFjk9RINBU p1BiWL+gTeTGvegRmRuNvL+aDeDUJi7ltXNvwKZL04XBoyPIabGvTBW24Su8wYFj2iKJWwBZty UqjdohmXZycGTLpJdCiC9zWquFCBRcHG8I90MvYUAd+R9t21Z7jrfq9rm9hDguRTRtd3oMFcwc xPYxDbkfvIu5xr6FKeQxl0zGA95S4XArCN4wIZlMLkpNq1FYK7UE8ewNSpxqxWslwHDUiO/nou wig= Message-ID: <01d38605-13f7-d785-a461-1c6826550b4e@codesourcery.com> Date: Tue, 28 Jun 2022 10:35:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] fortran, libgfortran, v3: Avoid using libquadmath for glibc 2.26+ Content-Language: en-US To: Jakub Jelinek , Mikael Morin CC: , , Harald Anlauf , "Joseph S. Myers" References: <70657edb-4055-e183-7e09-5e1321beb7f5@orange.fr> <38312dfa-76c6-ee85-9f6a-80c6e2f7bcdb@orange.fr> From: Tobias Burnus In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-14.mgc.mentorg.com (139.181.222.14) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jun 2022 08:35:13 -0000 On 27.06.22 15:30, Jakub Jelinek via Gcc-patches wrote: > Ok, here is an updated patch that uses _Float128/_Complex _Float128 for a= ll > of GFC_REAL_{16,17}_IS_FLOAT128, but still uses q/Q suffixes on literal > constants etc. when using libquadmath and f128/F128 otherwise. > This patch also includes the incremental powerpc64le fixes. > > Ok if it passes testing? LGTM =E2=80=93 I am not completely happy of having a TARGET_GLIBC_M{AJ,IN}O= R check in the FE (vs. a symbol-is-available check in libgfortran), but that should be fine as it is unlikely to cause any issue in practice. Thanks for the patch. Tobias > 2022-06-27 Jakub Jelinek > > gcc/fortran/ > * gfortran.h (gfc_real_info): Add use_iec_60559 bitfield. > * trans-types.h (gfc_real16_use_iec_60559): Declare. > * trans-types.cc (gfc_real16_use_iec_60559): Define. > (gfc_init_kinds): When building powerpc64le-linux libgfortran > on glibc 2.26 to 2.31, set gfc_real16_use_iec_60559 and > use_iec_60559. > (gfc_build_real_type): Set gfc_real16_use_iec_60559 and use_iec_605= 59 > on glibc 2.26 or later. > * trans-intrinsic.cc (gfc_build_intrinsic_lib_fndecls): Adjust > comment. Handle gfc_real16_use_iec_60559. > (gfc_get_intrinsic_lib_fndecl): Handle use_iec_60559. > libgfortran/ > * configure.ac: Check for strtof128 and strfromf128. > Check for math and complex *f128 functions. Set > have_iec_60559_libc_support to yes if *f128 support is around, for > --enable-libquadmath-support default to "default" rather than yes i= f > have_iec_60559_libc_support is yes. > * acinclude.m4 (LIBGFOR_CHECK_FLOAT128): Test > _Float128/_Complex _Float128 rather than __float128 and > _Complex float __attribute__((mode(TC))). If libquadmath support > is defaulted and have_iec_60559_libc_support is yes, define and sub= st > USE_IEC_60559. Remove unused LIBGFOR_BUILD_QUAD conditional. > * Makefile.am (kinds.h): Pass @USE_IEC_60559@ as an extra > mk-kinds-h.sh argument. > * mk-kinds-h.sh: Accept 4th use_iec_60559 argument. Use > _Float128/_Complex _Float128 types instead of __float128 and > _Complex float __attribute__((mode(TC))), and if use_iec_60559 i= s yes, > use f128 suffix instead of q and define GFC_REAL_16_USE_IEC_60559. > * kinds-override.h: Use _Float128/_Complex _Float128 types instead = of > __float128 and _Complex float __attribute__((mode(TC))), if > USE_IEC_60559 is defined, use f128 suffixes instead of q and > define GFC_REAL_17_USE_IEC_60559. > * libgfortran.h: Don't include quadmath_weak.h if USE_IEC_60559 is > defined. > (GFC_REAL_16_INFINITY, GFC_REAL_16_QUIET_NAN): Define > for GFC_REAL_16_USE_IEC_60559 differently. > * caf/single.c (convert_type): Use _Float128/_Complex _Float128 > instead of __float128 and _Complex float __attribute__((mode(TC))). > For HAVE_GFC_REAL_10 when HAVE_GFC_REAL_16 isn't defined use > _Complex long double instead of long double. > * ieee/issignaling_fallback.h (ieee854_float128_shape_type): Use > _Float128 instead of __float128. > (__issignalingf128): Change argument type to _Float128. > (issignaling): Use _Float128 instead of __float128 in _Generic. > * intrinsics/cshift0.c (cshift0): Use _Float128 instead of __float1= 28 > in a comment. Fix a comment typo, logn double -> long double. > * intrinsics/erfc_scaled.c (_THRESH, _M_2_SQRTPI, _INF, _ERFC, _EXP= ): > Use different definitions if GFC_REAL_16_USE_IEC_60559. > (_THRESH, _M_2_SQRTPI): Use GFC_REAL_17_LITERAL macro. > (_ERFC, _EXP): Use different definitions if GFC_REAL_17_USE_IEC_605= 59. > * intrinsics/spread_generic.c (spread, spread_scalar): Use _Float12= 8 > instead of __float128 in a comment. Fix a comment typo, > logn double -> long double. > * intrinsics/trigd.c (ENABLE_SIND, ENABLE_COSD, ENABLE_TAND): Handl= e > GFC_REAL_16_USE_IEC_60559. > * intrinsics/pack_generic.c (pack): Use _Float128 instead of > __float128 in a comment. Fix a comment typo, logn double -> > long double. > * intrinsics/unpack_generic.c (unpack1, unpack0): Likewise. > * runtime/in_pack_generic.c (internal_pack): Likewise. > * runtime/in_unpack_generic.c (internal_unpack): Likewise. > * io/read.c (convert_real, convert_infnan): Handle > GFC_REAL_16_USE_IEC_60559 and GFC_REAL_17_USE_IEC_60559. > * io/transfer128.c (tmp1, tmp2): Don't define if libquadmath > isn't needed. > * io/write_float.def (gfor_strfromf128): New function. > (DTOA2Q, FDTOA2Q): Define differently if > GFC_REAL_16_USE_IEC_60559 or GFC_REAL_17_USE_IEC_60559. > * m4/mtype.m4: Use different suffix if GFC_REAL_16_USE_IEC_60559 > or GFC_REAL_17_USE_IEC_60559. > * config.h.in: Regenerated. > * configure: Regenerated. > * Makefile.in: Regenerated. > * generated/bessel_r16.c: Regenerated. > * generated/bessel_r17.c: Regenerated. > * generated/norm2_r16.c: Regenerated. > * generated/norm2_r17.c: Regenerated. > [...] ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955