From f7657db990578e6193922cc0a4f8969c1bef368a Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Tue, 9 Sep 2003 22:10:32 +0000 Subject: 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 --- gcc/real.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/real.h') diff --git a/gcc/real.h b/gcc/real.h index dbce7bb..0543b8f 100644 --- a/gcc/real.h +++ b/gcc/real.h @@ -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. */ -- cgit v1.1