summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2022-08-26 09:52:02 +0200
committerJakub Jelinek <jakub@redhat.com>2022-08-26 09:52:02 +0200
commitdb630423a97ec6690a8eb0e5c3cb186c91e3740d (patch)
tree39c275211c214421468c0e60ff661f72e8210db8 /libgfortran
parent387e6f1570816915f8d198eec71c666439f41814 (diff)
downloadgcc-db630423a97ec6690a8eb0e5c3cb186c91e3740d.tar.gz
fortran: Expand ieee_arithmetic module's ieee_class inline [PR106579]
The following patch expands IEEE_CLASS inline in the FE, using the __builtin_fpclassify, __builtin_signbit and the new __builtin_issignaling builtins. 2022-08-26 Jakub Jelinek <jakub@redhat.com> PR fortran/106579 gcc/fortran/ * f95-lang.cc (gfc_init_builtin_functions): Initialize BUILT_IN_FPCLASSIFY. * libgfortran.h (IEEE_OTHER_VALUE, IEEE_SIGNALING_NAN, IEEE_QUIET_NAN, IEEE_NEGATIVE_INF, IEEE_NEGATIVE_NORMAL, IEEE_NEGATIVE_DENORMAL, IEEE_NEGATIVE_SUBNORMAL, IEEE_NEGATIVE_ZERO, IEEE_POSITIVE_ZERO, IEEE_POSITIVE_DENORMAL, IEEE_POSITIVE_SUBNORMAL, IEEE_POSITIVE_NORMAL, IEEE_POSITIVE_INF): New enum. * trans-intrinsic.cc (conv_intrinsic_ieee_class): New function. (gfc_conv_ieee_arithmetic_function): Handle ieee_class. libgfortran/ * ieee/ieee_helper.c (IEEE_OTHER_VALUE, IEEE_SIGNALING_NAN, IEEE_QUIET_NAN, IEEE_NEGATIVE_INF, IEEE_NEGATIVE_NORMAL, IEEE_NEGATIVE_DENORMAL, IEEE_NEGATIVE_SUBNORMAL, IEEE_NEGATIVE_ZERO, IEEE_POSITIVE_ZERO, IEEE_POSITIVE_DENORMAL, IEEE_POSITIVE_SUBNORMAL, IEEE_POSITIVE_NORMAL, IEEE_POSITIVE_INF): Move to gcc/fortran/libgfortran.h.
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ieee/ieee_helper.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/libgfortran/ieee/ieee_helper.c b/libgfortran/ieee/ieee_helper.c
index 1351b1ff54c..c5871b519f9 100644
--- a/libgfortran/ieee/ieee_helper.c
+++ b/libgfortran/ieee/ieee_helper.c
@@ -44,26 +44,6 @@ extern int ieee_class_helper_16 (GFC_REAL_16 *);
internal_proto(ieee_class_helper_16);
#endif
-/* Enumeration of the possible floating-point types. These values
- correspond to the hidden arguments of the IEEE_CLASS_TYPE
- derived-type of IEEE_ARITHMETIC. */
-
-enum {
- IEEE_OTHER_VALUE = 0,
- IEEE_SIGNALING_NAN,
- IEEE_QUIET_NAN,
- IEEE_NEGATIVE_INF,
- IEEE_NEGATIVE_NORMAL,
- IEEE_NEGATIVE_DENORMAL,
- IEEE_NEGATIVE_SUBNORMAL = IEEE_NEGATIVE_DENORMAL,
- IEEE_NEGATIVE_ZERO,
- IEEE_POSITIVE_ZERO,
- IEEE_POSITIVE_DENORMAL,
- IEEE_POSITIVE_SUBNORMAL = IEEE_POSITIVE_DENORMAL,
- IEEE_POSITIVE_NORMAL,
- IEEE_POSITIVE_INF
-};
-
#define CLASSMACRO(TYPE) \
int ieee_class_helper_ ## TYPE (GFC_REAL_ ## TYPE *value) \