diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2003-09-09 22:10:32 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2003-09-09 22:10:32 +0000 |
commit | f7657db990578e6193922cc0a4f8969c1bef368a (patch) | |
tree | 017b032798831b2ccb2f7a0e8cab504de72ba7fa /gcc/real.h | |
parent | dcbdd9cc82664884084bc48ec6869f893043f3c8 (diff) | |
download | gcc-f7657db990578e6193922cc0a4f8969c1bef368a.zip gcc-f7657db990578e6193922cc0a4f8969c1bef368a.tar.gz gcc-f7657db990578e6193922cc0a4f8969c1bef368a.tar.bz2 |
builtins.c (real_dconstp, [...]): New, split out from fold_builtin.
* builtins.c (real_dconstp, fold_builtin_logarithm,
fold_builtin_exponent): New, split out from fold_builtin. Also
generalize to add log2, log10, exp2 and exp10/pow10 equivalents.
* emit-rtl.c (dconst3, dconst10, dconstthird): New.
(init_emit_once): Initialize new dconsts, use ARRAY_SIZE in lieu
of hardcoded array size.
* fold-const.c (fold): Add cases for exp2, exp10 and pow10.
(tree_expr_nonnegative_p): Likewise.
* real.h (dconst3, dconst10, dconstthird): New.
testsuite:
* gcc.dg/torture/builtin-explog-1.c: New testcase.
From-SVN: r71252
Diffstat (limited to 'gcc/real.h')
-rw-r--r-- | gcc/real.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -322,14 +322,17 @@ extern void real_ldexp (REAL_VALUE_TYPE *, const REAL_VALUE_TYPE *, int); /* **** End of software floating point emulator interface macros **** */ -/* Constant real values 0, 1, 2, -1, -2 and 0.5. */ +/* Constant real values 0, 1, 2, 3, 10, -1, -2, 0.5 and 1/3. */ extern REAL_VALUE_TYPE dconst0; extern REAL_VALUE_TYPE dconst1; extern REAL_VALUE_TYPE dconst2; +extern REAL_VALUE_TYPE dconst3; +extern REAL_VALUE_TYPE dconst10; extern REAL_VALUE_TYPE dconstm1; extern REAL_VALUE_TYPE dconstm2; extern REAL_VALUE_TYPE dconsthalf; +extern REAL_VALUE_TYPE dconstthird; /* Function to return a real value (not a tree node) from a given integer constant. */ |