From 42721db07c36e472f5eb5f9f356e55be2fb61f38 Mon Sep 17 00:00:00 2001 From: sayle Date: Sat, 3 Aug 2002 23:21:31 +0000 Subject: * 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 --- gcc/genopinit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/genopinit.c') diff --git a/gcc/genopinit.c b/gcc/genopinit.c index 384a06601d8..ef4242a64cd 100644 --- a/gcc/genopinit.c +++ b/gcc/genopinit.c @@ -114,6 +114,8 @@ static const char * const optabs[] = "sqrt_optab->handlers[$A].insn_code = CODE_FOR_$(sqrt$a2$)", "sin_optab->handlers[$A].insn_code = CODE_FOR_$(sin$a2$)", "cos_optab->handlers[$A].insn_code = CODE_FOR_$(cos$a2$)", + "exp_optab->handlers[$A].insn_code = CODE_FOR_$(exp$a2$)", + "log_optab->handlers[$A].insn_code = CODE_FOR_$(log$a2$)", "strlen_optab->handlers[$A].insn_code = CODE_FOR_$(strlen$a$)", "one_cmpl_optab->handlers[$A].insn_code = CODE_FOR_$(one_cmpl$a2$)", "ffs_optab->handlers[$A].insn_code = CODE_FOR_$(ffs$a2$)", -- cgit v1.2.1