diff options
author | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-31 12:30:20 +0000 |
---|---|---|
committer | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-31 12:30:20 +0000 |
commit | 69b779ea24b4fc67090aa239b41852fa0fe33466 (patch) | |
tree | 8644f765075eeb7076137f6a73a27bd54182e229 /gcc/reg-stack.c | |
parent | 436c0a007524fcf3e7981b304688c01e1b58ec9e (diff) | |
download | gcc-69b779ea24b4fc67090aa239b41852fa0fe33466.tar.gz |
* optabs.h (enum optab_index): Add new OTI_isinf.
(isinf_optab): Define corresponding macro.
* optabs.c (init_optabs): Initialize isinf_optab.
* genopinit.c (optabs): Implement isinf_optab using isinf?f2
patterns.
* builtins.c (mathfn_built_in): Handle BUILT_IN_ISINF{,F,L}.
(expand_builtin_interclass_mathfn): Expand BUILT_IN_ISINF{,F,L}
using isinf_optab.
(expand_builtin): Expand BUILT_IN_ISINF{,F,L} using
expand_builtin_interclass_mathfn.
* reg_stack.c (subst_stack_regs_pat): Handle UNSPEC_FXAM.
* config/i386/i386.md (UNSPEC_FXAM): New constant.
(fxam<mode>2_i387): New insn pattern.
(isinf<mode>2) New expander to implement isinf, isinff and isinfl
built-in functions as x87 inline asm.
testsuite/ChangeLog:
* gcc.dg/builtins-63.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121419 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r-- | gcc/reg-stack.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index 0df425eebeb..f21d833c00b 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -1629,6 +1629,27 @@ subst_stack_regs_pat (rtx insn, stack regstack, rtx pat) replace_reg (src1, FIRST_STACK_REG); break; + case UNSPEC_FXAM: + + /* This insn only operate on the top of the stack. */ + + src1 = get_true_reg (&XVECEXP (pat_src, 0, 0)); + emit_swap_insn (insn, regstack, *src1); + + src1_note = find_regno_note (insn, REG_DEAD, REGNO (*src1)); + + replace_reg (src1, FIRST_STACK_REG); + + if (src1_note) + { + remove_regno_note (insn, REG_DEAD, + REGNO (XEXP (src1_note, 0))); + emit_pop_insn (insn, regstack, XEXP (src1_note, 0), + EMIT_AFTER); + } + + break; + case UNSPEC_SIN: case UNSPEC_COS: case UNSPEC_FRNDINT: |