diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2005-03-12 16:13:41 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2005-03-12 16:13:41 +0000 |
commit | 7cfb2e10498c65a7244dbdd863f0fc6069fffbd2 (patch) | |
tree | 54c2d1a2bbb11dfb4e74179c772289dc59e67bcf | |
parent | 703be24934151f4bd0e560ebaf3cb3441a9ac249 (diff) | |
download | gcc-7cfb2e10498c65a7244dbdd863f0fc6069fffbd2.zip gcc-7cfb2e10498c65a7244dbdd863f0fc6069fffbd2.tar.gz gcc-7cfb2e10498c65a7244dbdd863f0fc6069fffbd2.tar.bz2 |
builtins.c (fold_builtin_exponent): Take decomposed arguments of CALL_EXPR.
* builtins.c (fold_builtin_exponent): Take decomposed
arguments of CALL_EXPR.
(fold_builtin_1): Update a call to fold_builtin_exponent.
From-SVN: r96341
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/builtins.c | 12 |
2 files changed, 9 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db7e9fa..de9f040 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -15,6 +15,10 @@ * value-prof.c (mod_subtract_transform): Remove local variable value. + * builtins.c (fold_builtin_exponent): Take decomposed + arguments of CALL_EXPR. + (fold_builtin_1): Update a call to fold_builtin_exponent. + 2005-03-12 Geoffrey Keating <geoffk@apple.com> * c-lex.c (c_lex_with_flags): Add parameter to call to diff --git a/gcc/builtins.c b/gcc/builtins.c index e6e0717..ff9a535 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -7089,13 +7089,11 @@ fold_builtin_powi (tree fndecl ATTRIBUTE_UNUSED, tree arglist, tree type) VALUE is the value which will be raised to a power. */ static tree -fold_builtin_exponent (tree exp, const REAL_VALUE_TYPE *value) +fold_builtin_exponent (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); @@ -8106,12 +8104,12 @@ fold_builtin_1 (tree exp, bool ignore) case BUILT_IN_EXP: case BUILT_IN_EXPF: case BUILT_IN_EXPL: - return fold_builtin_exponent (exp, &dconste); + return fold_builtin_exponent (fndecl, arglist, &dconste); case BUILT_IN_EXP2: case BUILT_IN_EXP2F: case BUILT_IN_EXP2L: - return fold_builtin_exponent (exp, &dconst2); + return fold_builtin_exponent (fndecl, arglist, &dconst2); case BUILT_IN_EXP10: case BUILT_IN_EXP10F: @@ -8119,7 +8117,7 @@ fold_builtin_1 (tree exp, bool ignore) case BUILT_IN_POW10: case BUILT_IN_POW10F: case BUILT_IN_POW10L: - return fold_builtin_exponent (exp, &dconst10); + return fold_builtin_exponent (fndecl, arglist, &dconst10); case BUILT_IN_LOG: case BUILT_IN_LOGF: |