aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorKazu Hirata <kazu@cs.umass.edu>2005-03-12 16:14:42 +0000
committerKazu Hirata <kazu@gcc.gnu.org>2005-03-12 16:14:42 +0000
commitfba08921106c1dabf0b9be81dc02c395f0e62285 (patch)
tree7b14ca2dec88a9d4abb567e7b845defe5e201204 /gcc/builtins.c
parent7cfb2e10498c65a7244dbdd863f0fc6069fffbd2 (diff)
downloadgcc-fba08921106c1dabf0b9be81dc02c395f0e62285.zip
gcc-fba08921106c1dabf0b9be81dc02c395f0e62285.tar.gz
gcc-fba08921106c1dabf0b9be81dc02c395f0e62285.tar.bz2
builtins.c (fold_builtin_logarithm): Take decomposed arguments of CALL_EXPR.
* builtins.c (fold_builtin_logarithm): Take decomposed arguments of CALL_EXPR. (fold_builtin_1): Update a call to fold_builtin_logarithm. From-SVN: r96342
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index ff9a535..1c03803 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -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: