diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-15 13:32:31 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-15 13:32:31 +0000 |
commit | 839151adeebaaf0dd12395ad390eb2dbcd955879 (patch) | |
tree | 373d2c373f5f8302c62429a4f3bfecb9e2795db6 /gcc/reg-stack.c | |
parent | 53d487a4dd9bcfec13bde1738801328c18756a2d (diff) | |
download | gcc-839151adeebaaf0dd12395ad390eb2dbcd955879.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67973 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r-- | gcc/reg-stack.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index 6efea36d6dc..5b3a359d606 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -1711,6 +1711,8 @@ subst_stack_regs_pat (insn, regstack, pat) { case UNSPEC_SIN: case UNSPEC_COS: + case UNSPEC_FRNDINT: + case UNSPEC_F2XM1: /* These insns only operate on the top of the stack. */ src1 = get_true_reg (&XVECEXP (pat_src, 0, 0)); @@ -1734,6 +1736,7 @@ subst_stack_regs_pat (insn, regstack, pat) case UNSPEC_FPATAN: case UNSPEC_FYL2X: + case UNSPEC_FSCALE: /* These insns operate on the top two stack slots. */ src1 = get_true_reg (&XVECEXP (pat_src, 0, 0)); |