From: Tobias Burnus <tobias@codesourcery.com>
To: Jakub Jelinek <jakub@redhat.com>, Mikael Morin <morin-mikael@orange.fr>
Cc: <fortran@gcc.gnu.org>, <gcc-patches@gcc.gnu.org>,
Harald Anlauf <anlauf@gmx.de>,
"Joseph S. Myers" <joseph@codesourcery.com>
Subject: Re: [PATCH] fortran, libgfortran, v3: Avoid using libquadmath for glibc 2.26+
Date: Tue, 28 Jun 2022 10:35:03 +0200 [thread overview]
Message-ID: <01d38605-13f7-d785-a461-1c6826550b4e@codesourcery.com> (raw)
In-Reply-To: <YrmxCTxa3L5ZhNmy@tucnak>
On 27.06.22 15:30, Jakub Jelinek via Gcc-patches wrote:
> Ok, here is an updated patch that uses _Float128/_Complex _Float128 for all
> 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 – I am not completely happy of having a TARGET_GLIBC_M{AJ,IN}OR 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 <jakub@redhat.com>
>
> 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_60559
> 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 if
> 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 subst
> 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 is 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 __float128
> 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_60559.
> * intrinsics/spread_generic.c (spread, spread_scalar): Use _Float128
> instead of __float128 in a comment. Fix a comment typo,
> logn double -> long double.
> * intrinsics/trigd.c (ENABLE_SIND, ENABLE_COSD, ENABLE_TAND): Handle
> 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ße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
next prev parent reply other threads:[~2022-06-28 8:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-23 12:04 [PATCH] fortran, libgfortran: " Jakub Jelinek
2022-06-23 20:49 ` Harald Anlauf
2022-06-23 21:17 ` Jakub Jelinek
2022-06-24 10:29 ` [PATCH] fortran, libgfortran, v2: " Jakub Jelinek
2022-06-24 21:06 ` Harald Anlauf
2022-06-26 18:45 ` Mikael Morin
2022-06-27 7:54 ` Jakub Jelinek
2022-06-27 11:56 ` Mikael Morin
2022-06-27 13:30 ` [PATCH] fortran, libgfortran, v3: " Jakub Jelinek
2022-06-28 7:01 ` Jakub Jelinek
2022-06-28 8:35 ` Tobias Burnus [this message]
2022-06-28 10:57 ` Jakub Jelinek
2022-06-27 20:54 ` [PATCH] fortran, libgfortran, v2: " Joseph Myers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=01d38605-13f7-d785-a461-1c6826550b4e@codesourcery.com \
--to=tobias@codesourcery.com \
--cc=anlauf@gmx.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=joseph@codesourcery.com \
--cc=morin-mikael@orange.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).