diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6c2d6ce1791..197ebd4266f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-11-12 Oleg Endo + + PR target/53512 + * config/sh/sh.md (sincossf3): Fix swapped sin and cos operands. + 2012-11-11 H.J. Lu * config/i386/i386.md (*movti_internal_rex64): Remove "!" from diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 3c9226523d7..545806d4478 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -12433,11 +12433,10 @@ label: ;; will be expanded to the sincos pattern and one of the output values will ;; remain unused. (define_expand "sincossf3" - [(set (match_operand:SF 0 "nonimmediate_operand" "") - (unspec:SF [(match_operand:SF 2 "fp_arith_reg_operand" "")] - UNSPEC_FSINA)) - (set (match_operand:SF 1 "nonimmediate_operand" "") - (unspec:SF [(match_dup 2)] UNSPEC_FCOSA))] + [(set (match_operand:SF 0 "nonimmediate_operand") + (unspec:SF [(match_operand:SF 2 "fp_arith_reg_operand")] UNSPEC_FCOSA)) + (set (match_operand:SF 1 "nonimmediate_operand") + (unspec:SF [(match_dup 2)] UNSPEC_FSINA))] "TARGET_FPU_ANY && TARGET_FSCA" { rtx scaled = gen_reg_rtx (SFmode); @@ -12450,8 +12449,8 @@ label: emit_sf_insn (gen_fsca (fsca, truncated, sh_fsca_int2sf (), get_fpscr_rtx ())); - emit_move_insn (operands[0], gen_rtx_SUBREG (SFmode, fsca, 0)); - emit_move_insn (operands[1], gen_rtx_SUBREG (SFmode, fsca, 4)); + emit_move_insn (operands[0], gen_rtx_SUBREG (SFmode, fsca, 4)); + emit_move_insn (operands[1], gen_rtx_SUBREG (SFmode, fsca, 0)); DONE; })