* builtins.c (fold_builtin_fpclassify): Fix spelling of FP_INFINITE.
* doc/extend.texi: Likewise.
testsuite:
* gcc.dg/tg-tests.h: Fix spelling of FP_INFINITE.
From-SVN: r135844
+2008-05-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * builtins.c (fold_builtin_fpclassify): Fix spelling of FP_INFINITE.
+ * doc/extend.texi: Likewise.
+
2008-05-23 DJ Delorie <dj@redhat.com>
* config/m32c/jump.md (untyped_call): Add.
This builtin will generate code to return the appropriate floating
point classification depending on the value of the floating point
number passed in. The possible return values must be supplied as
- int arguments to the call in the following order: FP_NAN, FP_INF,
+ int arguments to the call in the following order: FP_NAN, FP_INFINITE,
FP_NORMAL, FP_SUBNORMAL and FP_ZERO. The ellipses is for exactly
one floating point argument which is "type generic". */
static tree
fold_builtin_fpclassify (tree exp)
{
- tree fp_nan, fp_inf, fp_normal, fp_subnormal, fp_zero, arg, type, res, tmp;
+ tree fp_nan, fp_infinite, fp_normal, fp_subnormal, fp_zero,
+ arg, type, res, tmp;
enum machine_mode mode;
REAL_VALUE_TYPE r;
char buf[128];
return NULL_TREE;
fp_nan = CALL_EXPR_ARG (exp, 0);
- fp_inf = CALL_EXPR_ARG (exp, 1);
+ fp_infinite = CALL_EXPR_ARG (exp, 1);
fp_normal = CALL_EXPR_ARG (exp, 2);
fp_subnormal = CALL_EXPR_ARG (exp, 3);
fp_zero = CALL_EXPR_ARG (exp, 4);
/* fpclassify(x) ->
isnan(x) ? FP_NAN :
- (fabs(x) == Inf ? FP_INF :
+ (fabs(x) == Inf ? FP_INFINITE :
(fabs(x) >= DBL_MIN ? FP_NORMAL :
(x == 0 ? FP_ZERO : FP_SUBNORMAL))). */
real_inf (&r);
tmp = fold_build2 (EQ_EXPR, integer_type_node, arg,
build_real (type, r));
- res = fold_build3 (COND_EXPR, integer_type_node, tmp, fp_inf, res);
+ res = fold_build3 (COND_EXPR, integer_type_node, tmp, fp_infinite, res);
}
if (HONOR_NANS (mode))
five int arguments should be the target library's notion of the
possible FP classes and are used for return values. They must be
constant values and they must appear in this order: @code{FP_NAN},
-@code{FP_INF}, @code{FP_NORMAL}, @code{FP_SUBNORMAL} and
+@code{FP_INFINITE}, @code{FP_NORMAL}, @code{FP_SUBNORMAL} and
@code{FP_ZERO}. The ellipsis is for exactly one floating point value
to classify. GCC treats the last argument as type-generic, which
means it does not do default promotion from float to double.
+2008-05-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * gcc.dg/tg-tests.h: Fix spelling of FP_INFINITE.
+
2008-05-23 Sandra Loosemore <sandra@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
/* Test various type-generic builtins by calling "main_tests()". */
#define FP_NAN 1
-#define FP_INF 2
+#define FP_INFINITE 2
#define FP_NORMAL 3
#define FP_SUBNORMAL 4
#define FP_ZERO 5
-#define fpclassify(X) __builtin_fpclassify(FP_NAN, FP_INF, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, (X))
+#define fpclassify(X) __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, (X))
void __attribute__ ((__noinline__))
foo_1 (float f, double d, long double ld,
/* Test infinity. */
f = __builtin_inff(); d = __builtin_inf(); ld = __builtin_infl();
- foo(f, d, ld, /*unord=*/ 0, /*isnan=*/ 0, /*isinf=*/ 1, /*isfin=*/ 0, /*isnorm=*/ 0, FP_INF);
+ foo(f, d, ld, /*unord=*/ 0, /*isnan=*/ 0, /*isinf=*/ 1, /*isfin=*/ 0, /*isnorm=*/ 0, FP_INFINITE);
/* Test zero. */
f = 0; d = 0; ld = 0;
/* Test overflow values. */
f = __FLT_MAX__*2; d = __DBL_MAX__*2; ld = __LDBL_MAX__*2;
- foo(f, d, ld, /*unord=*/ 0, /*isnan=*/ 0, /*isinf=*/ 1, /*isfin=*/ 0, /*isnorm=*/ 0, FP_INF);
+ foo(f, d, ld, /*unord=*/ 0, /*isnan=*/ 0, /*isinf=*/ 1, /*isfin=*/ 0, /*isnorm=*/ 0, FP_INFINITE);
return 0;
}