OSDN Git Service

* builtins.c (fold_builtin_fpclassify): Fix spelling of FP_INFINITE.
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 24 May 2008 05:56:00 +0000 (05:56 +0000)
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 24 May 2008 05:56:00 +0000 (05:56 +0000)
* doc/extend.texi: Likewise.

testsuite:
* gcc.dg/tg-tests.h: Fix spelling of FP_INFINITE.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135844 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/builtins.c
gcc/doc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tg-tests.h

index 57bb8be..2a77cf8 100644 (file)
@@ -1,3 +1,8 @@
+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.
index d442469..695567c 100644 (file)
@@ -9748,14 +9748,15 @@ fold_builtin_classify (tree fndecl, tree arg, int builtin_index)
    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];
@@ -9767,7 +9768,7 @@ fold_builtin_fpclassify (tree exp)
     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);
@@ -9778,7 +9779,7 @@ fold_builtin_fpclassify (tree exp)
 
   /* 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))).  */
   
@@ -9796,7 +9797,7 @@ fold_builtin_fpclassify (tree exp)
       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))
index f0e8593..103af2c 100644 (file)
@@ -6567,7 +6567,7 @@ This built-in implements the C99 fpclassify functionality.  The first
 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.
index a3edd51..951fe3d 100644 (file)
@@ -1,3 +1,7 @@
+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>
 
index dc95a2c..ce9cfb8 100644 (file)
@@ -1,11 +1,11 @@
 /* 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,
@@ -118,7 +118,7 @@ main_tests (void)
 
   /* 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;
@@ -142,7 +142,7 @@ main_tests (void)
 
   /* 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;
 }