* reg-stack.c (subst_stack_regs_pat) [UNSPEC_SINCOS_COS,
commit64d0b9960a866b1de5520d3e55fce12bcfbd6bf6
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Jan 2007 13:06:57 +0000 (18 13:06 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Jan 2007 13:06:57 +0000 (18 13:06 +0000)
treeb09549c3db8a84ccbaeffdb31e9f328b4e85b663
parent5bc9639859eb6ad2ec09d09aa2cb28fd029edcc1
* reg-stack.c (subst_stack_regs_pat) [UNSPEC_SINCOS_COS,
UNSPEC_XTRACT_FRACT]: Use generic code for instructions that
operate on the top of stack.
[UNSPEC_SINCOS_SIN, UNSPEC_XTRACT_EXP, UNSPEC_TAN]: Rewrite
register handling of instructions that output to the second
stack slot.
[UNSPEC_TAN_ONE, UNSPEC_TAN_TAN]: Remove.
(move_for_stack_reg): Special-case check for dead destination
stack slot for constant load of 1.0 inside UNSPEC_TAN.

* config/i386/i386.md (UNSPEC_TAN): New constant.
(UNSPEC_TAN_ONE, UNSPEC_TAN_TAN): Remove.
(fptanxf4_i387, fptan_extend<mode>xf4_i387): New patterns
to correctly model move of constant 1.0 to top stack slot.
(*tandf3_1, *tansf3_1, *tanxf3_1): Remove insn patterns.
(unnamed peephole2 pattern): Remove corresponding peephole2
pattern that optimizes tan insn and loading of constant 1.0.
(tanxf2): Use fptanxf4_i387.
(tan<mode>2): Rename from tansf2 and tandf2 and macroize insn
patterns using X87MODEF12 mode macro.  Use fptan_extend<mode>xf4_i387
and truncate result to requested mode.  Use SSE_FLOAT_MODE_P to
disable patterns for SSE math.
(sincos<mode>3): Use truncxf<mode>2_i387_noop for truncation.
(fyl2x_extend<mode>xf3_i387): Use X87MODEF12 for operand 1.

testsuite/ChangeLog:

* gcc.target/i386/387-8.c: Update comment about optimizing
inherent load of 1.0 of fptan instruction.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120899 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/i386/i386.md
gcc/reg-stack.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/387-8.c