From 8918c507b52af94287c0e2806f1a5035ac3b5e43 Mon Sep 17 00:00:00 2001 From: ghazi Date: Tue, 9 Sep 2003 22:10:32 +0000 Subject: * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71252 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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 dbce7bb54f4..0543b8f8f9d 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.2.1