diff options
author | Uros Bizjak <uros@kss-loka.si> | 2004-05-03 07:31:45 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2004-05-03 07:31:45 +0200 |
commit | 7a8e07c7d1bc8526e0d67cb7ae0dc51ba5b90f68 (patch) | |
tree | c1a89b48d29d70f789473f5c7def695357e909f9 /gcc/builtins.c | |
parent | 5f2b959917e0d13044851e6165e9c17d4f4b3a0f (diff) | |
download | gcc-7a8e07c7d1bc8526e0d67cb7ae0dc51ba5b90f68.zip gcc-7a8e07c7d1bc8526e0d67cb7ae0dc51ba5b90f68.tar.gz gcc-7a8e07c7d1bc8526e0d67cb7ae0dc51ba5b90f68.tar.bz2 |
optabs.h (enum optab_index): Add new OTI_expm1.
2004-05-03 Uros Bizjak <uros@kss-loka.si>
* optabs.h (enum optab_index): Add new OTI_expm1.
(expm1_optab): Define corresponding macro.
* optabs.c (init_optabs): Initialize expm1_optab.
* genopinit.c (optabs): Implement expm1_optab using expm1?f2
patterns.
* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_EXPM1{,F,L}
using expm1_optab.
(expand_builtin): Expand BUILT_IN_EXPM1{,F,L} using
expand_builtin_mathfn if flag_unsafe_math_optimizations is set.
* config/i386/i386.md (expm1df2, expm1sf2, expm1xf2): New expanders
to implement expm1, expm1f and expm1l built-ins as inline x87
intrinsics.
testsuite:
* gcc.dg/builtins-34.c: Also check expm1*.
From-SVN: r81425
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 96d365a..c42a423 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -1600,6 +1600,10 @@ expand_builtin_mathfn (tree exp, rtx target, rtx subtarget) case BUILT_IN_EXP2F: case BUILT_IN_EXP2L: errno_set = true; builtin_optab = exp2_optab; break; + case BUILT_IN_EXPM1: + case BUILT_IN_EXPM1F: + case BUILT_IN_EXPM1L: + errno_set = true; builtin_optab = expm1_optab; break; case BUILT_IN_LOGB: case BUILT_IN_LOGBF: case BUILT_IN_LOGBL: @@ -5292,6 +5296,9 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, case BUILT_IN_EXP2: case BUILT_IN_EXP2F: case BUILT_IN_EXP2L: + case BUILT_IN_EXPM1: + case BUILT_IN_EXPM1F: + case BUILT_IN_EXPM1L: case BUILT_IN_LOGB: case BUILT_IN_LOGBF: case BUILT_IN_LOGBL: |