comparison libgfortran/ieee/ieee_helper.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 /* Helper functions in C for IEEE modules 1 /* Helper functions in C for IEEE modules
2 Copyright (C) 2013-2018 Free Software Foundation, Inc. 2 Copyright (C) 2013-2020 Free Software Foundation, Inc.
3 Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> 3 Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4 4
5 This file is part of the GNU Fortran runtime library (libgfortran). 5 This file is part of the GNU Fortran runtime library (libgfortran).
6 6
7 Libgfortran is free software; you can redistribute it and/or 7 Libgfortran is free software; you can redistribute it and/or
48 derived-type of IEEE_ARITHMETIC. */ 48 derived-type of IEEE_ARITHMETIC. */
49 49
50 enum { IEEE_OTHER_VALUE = 0, IEEE_SIGNALING_NAN, IEEE_QUIET_NAN, 50 enum { IEEE_OTHER_VALUE = 0, IEEE_SIGNALING_NAN, IEEE_QUIET_NAN,
51 IEEE_NEGATIVE_INF, IEEE_NEGATIVE_NORMAL, IEEE_NEGATIVE_DENORMAL, 51 IEEE_NEGATIVE_INF, IEEE_NEGATIVE_NORMAL, IEEE_NEGATIVE_DENORMAL,
52 IEEE_NEGATIVE_ZERO, IEEE_POSITIVE_ZERO, IEEE_POSITIVE_DENORMAL, 52 IEEE_NEGATIVE_ZERO, IEEE_POSITIVE_ZERO, IEEE_POSITIVE_DENORMAL,
53 IEEE_POSITIVE_NORMAL, IEEE_POSITIVE_INF }; 53 IEEE_POSITIVE_NORMAL, IEEE_POSITIVE_INF, IEEE_SUBNORMAL,
54 IEEE_NEGATIVE_SUBNORMAL, IEEE_POSITIVE_SUBNORMAL };
54 55
55 #define CLASSMACRO(TYPE) \ 56 #define CLASSMACRO(TYPE) \
56 int ieee_class_helper_ ## TYPE (GFC_REAL_ ## TYPE *value) \ 57 int ieee_class_helper_ ## TYPE (GFC_REAL_ ## TYPE *value) \
57 { \ 58 { \
58 int res = __builtin_fpclassify (IEEE_QUIET_NAN, IEEE_POSITIVE_INF, \ 59 int res = __builtin_fpclassify (IEEE_QUIET_NAN, IEEE_POSITIVE_INF, \