]> gcc.gnu.org Git - gcc.git/commitdiff
builtins.c (fold_builtin_logarithm): Take decomposed arguments of CALL_EXPR.
authorKazu Hirata <kazu@cs.umass.edu>
Sat, 12 Mar 2005 16:14:42 +0000 (16:14 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Sat, 12 Mar 2005 16:14:42 +0000 (16:14 +0000)
* builtins.c (fold_builtin_logarithm): Take decomposed
arguments of CALL_EXPR.
(fold_builtin_1): Update a call to fold_builtin_logarithm.

From-SVN: r96342

gcc/ChangeLog
gcc/builtins.c

index de9f040ea6c2ddc13524b05a5c40536156d194d8..19cf0b943a843e12c03f1b03c72e37ad44381387 100644 (file)
        arguments of CALL_EXPR.
        (fold_builtin_1): Update a call to fold_builtin_exponent.
 
+       * builtins.c (fold_builtin_logarithm): Take decomposed
+       arguments of CALL_EXPR.
+       (fold_builtin_1): Update a call to fold_builtin_logarithm.
+
 2005-03-12  Geoffrey Keating  <geoffk@apple.com>
 
        * c-lex.c (c_lex_with_flags): Add parameter to call to 
index ff9a5356c86d84260dd12ab9c11c19b1ba01e380..1c03803897951313abccc8ccc02c72265a457f96 100644 (file)
@@ -6783,13 +6783,11 @@ real_dconstp (tree expr, const REAL_VALUE_TYPE *value)
    function.  VALUE is the base of the logN function.  */
 
 static tree
-fold_builtin_logarithm (tree exp, const REAL_VALUE_TYPE *value)
+fold_builtin_logarithm (tree fndecl, tree arglist,
+                       const REAL_VALUE_TYPE *value)
 {
-  tree arglist = TREE_OPERAND (exp, 1);
-
   if (validate_arglist (arglist, REAL_TYPE, VOID_TYPE))
     {
-      tree fndecl = get_callee_fndecl (exp);
       tree type = TREE_TYPE (TREE_TYPE (fndecl));
       tree arg = TREE_VALUE (arglist);
       const enum built_in_function fcode = builtin_mathfn_code (arg);
@@ -8122,17 +8120,17 @@ fold_builtin_1 (tree exp, bool ignore)
     case BUILT_IN_LOG:
     case BUILT_IN_LOGF:
     case BUILT_IN_LOGL:
-      return fold_builtin_logarithm (exp, &dconste);
+      return fold_builtin_logarithm (fndecl, arglist, &dconste);
 
     case BUILT_IN_LOG2:
     case BUILT_IN_LOG2F:
     case BUILT_IN_LOG2L:
-      return fold_builtin_logarithm (exp, &dconst2);
+      return fold_builtin_logarithm (fndecl, arglist, &dconst2);
 
     case BUILT_IN_LOG10:
     case BUILT_IN_LOG10F:
     case BUILT_IN_LOG10L:
-      return fold_builtin_logarithm (exp, &dconst10);
+      return fold_builtin_logarithm (fndecl, arglist, &dconst10);
 
     case BUILT_IN_TAN:
     case BUILT_IN_TANF:
This page took 0.093333 seconds and 5 git commands to generate.