summaryrefslogtreecommitdiff
path: root/gcc/real.h
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-09 22:10:32 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-09 22:10:32 +0000
commit8918c507b52af94287c0e2806f1a5035ac3b5e43 (patch)
tree017b032798831b2ccb2f7a0e8cab504de72ba7fa /gcc/real.h
parentbb94c3001bb9c4aa371491bdec7ceeb2a9c6a78d (diff)
downloadgcc-8918c507b52af94287c0e2806f1a5035ac3b5e43.tar.gz
* 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
Diffstat (limited to 'gcc/real.h')
-rw-r--r--gcc/real.h5
1 files changed, 4 insertions, 1 deletions
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. */