diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2007-10-17 17:22:23 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2007-10-17 17:22:23 +0200 |
commit | 590e9a42f41c63a825798501a94419c1ae60f6ab (patch) | |
tree | 99c5650f062fac9747d1952e2322e092dcc513b5 /gcc/reg-stack.c | |
parent | 13d7164405fe380ef6d3805ace44565447c25dbb (diff) | |
download | gcc-590e9a42f41c63a825798501a94419c1ae60f6ab.tar.gz |
re PR middle-end/33794 (Wrong code w/ -ffast-math)
PR middle-end/33794
* reg-stack.c (move_for_stack_reg): Swap input argument of
UNSPEC_TAN insn to the top of the stack.
From-SVN: r129406
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r-- | gcc/reg-stack.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index f5d263fbff2..248a8c2b9a5 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -1085,11 +1085,13 @@ move_for_stack_reg (rtx insn, stack regstack, rtx pat) special case with i387 UNSPEC_TAN, where destination is live (an argument to fptan) but inherent load of 1.0 is modelled as a load from a constant. */ - if (! (GET_CODE (pat) == PARALLEL - && XVECLEN (pat, 0) == 2 - && GET_CODE (XVECEXP (pat, 0, 1)) == SET - && GET_CODE (SET_SRC (XVECEXP (pat, 0, 1))) == UNSPEC - && XINT (SET_SRC (XVECEXP (pat, 0, 1)), 1) == UNSPEC_TAN)) + if (GET_CODE (pat) == PARALLEL + && XVECLEN (pat, 0) == 2 + && GET_CODE (XVECEXP (pat, 0, 1)) == SET + && GET_CODE (SET_SRC (XVECEXP (pat, 0, 1))) == UNSPEC + && XINT (SET_SRC (XVECEXP (pat, 0, 1)), 1) == UNSPEC_TAN) + emit_swap_insn (insn, regstack, dest); + else gcc_assert (get_hard_regnum (regstack, dest) < FIRST_STACK_REG); gcc_assert (regstack->top < REG_STACK_SIZE); |