i386.md (expsf2, [...]): New patterns to implement exp, expf and expl built-ins as...
authorRoger Sayle <roger@eyesopen.com>
Sun, 15 Jun 2003 13:32:31 +0000 (13:32 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Sun, 15 Jun 2003 13:32:31 +0000 (13:32 +0000)
commit9d5b9daeb91118c0b3b9f8fbce2f074917d292bc
tree373d2c373f5f8302c62429a4f3bfecb9e2795db6
parent84fb20190544bfca4f25ec8e8abd51b763f94fb3
i386.md (expsf2, [...]): New patterns to implement exp, expf and expl built-ins as inline x87 intrinsics.

* config/i386/i386.md (expsf2, expdf2, expxf2): New patterns to
implement exp, expf and expl built-ins as inline x87 intrinsics.
(UNSPEC_FSCALE, UNSPEC_FRNDINT, UNSPEC_F2XM1): New unspecs to
represent x87's fscale, frndint and f2xm1 insns respectively.
(*fscale_sfxf3, *fscale_dfxf3, *fscale_xf3): New insn patterns
to encode x87's "fscale" instruction followed by a pop.
(*frndintxf2): New insn pattern for "frndint".
(*f2xm1xf2): New insn pattern for "f2xm1".

* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FRNDINT and
UNSPEC_F2XM1 like UNSPEC_{SIN,COS} and handle UNSPEC_FSCALE like
UNSPEC_FPATAN.

* gcc.dg/builtins-22.c: New test case.
* gcc.dg/i386-387-1.c: Update to test exp.
* gcc.dg/i386-387-2.c: Likewise.

From-SVN: r67973
gcc/ChangeLog
gcc/config/i386/i386.md
gcc/reg-stack.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtins-22.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/i386-387-1.c
gcc/testsuite/gcc.dg/i386-387-2.c