summaryrefslogtreecommitdiffstats
path: root/gcc/optabs.h
diff options
context:
space:
mode:
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-03 23:21:31 +0000
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-03 23:21:31 +0000
commit42721db07c36e472f5eb5f9f356e55be2fb61f38 (patch)
tree43f230abfa5b65f3cb384df85d588543c32be03e /gcc/optabs.h
parente7971c005e1ef3c054f3e10f96642bca896411bf (diff)
downloadppe42-gcc-42721db07c36e472f5eb5f9f356e55be2fb61f38.tar.gz
ppe42-gcc-42721db07c36e472f5eb5f9f356e55be2fb61f38.zip
* builtins.def: Define new builtin functions exp, expf, expl,
log, logf and logl (and their __builtin_* variants). * optabs.h (enum optab_index): Add new OTI_exp and OTI_log. Define exp_optab and log_optab. * optabs.c (init_optans): Initialize exp_optab and log_optab. * genopinit.c (optabs): Implement exp_optab and log_optab using exp?f2 and log?f2 patterns. * builtins.c (expand_builtin_mathfn): Handle BUILT_IN_EXP* and BUILT_IN_LOG* using exp_optab and log_optab respectively. (expand_builtin): Ignore the new builtins (and all cos and sin variants) when not optimizing. Expand new builtins via expand_builtin_mathfn when flag_unsafe_math_optimizations. * doc/extend.texi: Document new exp and log builtins. * doc/md.texi: Document new exp?f2 and log?f2 patterns (and previously undocumented cos?f2 and sin?f2 patterns). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56010 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/optabs.h')
-rw-r--r--gcc/optabs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/optabs.h b/gcc/optabs.h
index 08dbec1e80a..fd80d826720 100644
--- a/gcc/optabs.h
+++ b/gcc/optabs.h
@@ -131,6 +131,10 @@ enum optab_index
OTI_sin,
/* Cosine */
OTI_cos,
+ /* Exponential */
+ OTI_exp,
+ /* Natural Logarithm */
+ OTI_log,
/* Compare insn; two operands. */
OTI_cmp,
@@ -198,6 +202,8 @@ extern GTY(()) optab optab_table[OTI_MAX];
#define sqrt_optab (optab_table[OTI_sqrt])
#define sin_optab (optab_table[OTI_sin])
#define cos_optab (optab_table[OTI_cos])
+#define exp_optab (optab_table[OTI_exp])
+#define log_optab (optab_table[OTI_log])
#define cmp_optab (optab_table[OTI_cmp])
#define ucmp_optab (optab_table[OTI_ucmp])
OpenPOWER on IntegriCloud