Commit dfa228f0 by Oleg Endo

re PR target/53512 (SH Target: Allow fsca and fsrra for non-SH4A)

	PR target/53512
	* config/sh/sh.md (sincossf3): Fix swapped sin and cos operands.

From-SVN: r193423
parent 578a9947
2012-11-12 Oleg Endo <olegendo@gcc.gnu.org>
PR target/53512
* config/sh/sh.md (sincossf3): Fix swapped sin and cos operands.
2012-11-11 H.J. Lu <hongjiu.lu@intel.com> 2012-11-11 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.md (*movti_internal_rex64): Remove "!" from * config/i386/i386.md (*movti_internal_rex64): Remove "!" from
...@@ -12433,11 +12433,10 @@ label: ...@@ -12433,11 +12433,10 @@ label:
;; will be expanded to the sincos pattern and one of the output values will ;; will be expanded to the sincos pattern and one of the output values will
;; remain unused. ;; remain unused.
(define_expand "sincossf3" (define_expand "sincossf3"
[(set (match_operand:SF 0 "nonimmediate_operand" "") [(set (match_operand:SF 0 "nonimmediate_operand")
(unspec:SF [(match_operand:SF 2 "fp_arith_reg_operand" "")] (unspec:SF [(match_operand:SF 2 "fp_arith_reg_operand")] UNSPEC_FCOSA))
UNSPEC_FSINA)) (set (match_operand:SF 1 "nonimmediate_operand")
(set (match_operand:SF 1 "nonimmediate_operand" "") (unspec:SF [(match_dup 2)] UNSPEC_FSINA))]
(unspec:SF [(match_dup 2)] UNSPEC_FCOSA))]
"TARGET_FPU_ANY && TARGET_FSCA" "TARGET_FPU_ANY && TARGET_FSCA"
{ {
rtx scaled = gen_reg_rtx (SFmode); rtx scaled = gen_reg_rtx (SFmode);
...@@ -12450,8 +12449,8 @@ label: ...@@ -12450,8 +12449,8 @@ label:
emit_sf_insn (gen_fsca (fsca, truncated, sh_fsca_int2sf (), emit_sf_insn (gen_fsca (fsca, truncated, sh_fsca_int2sf (),
get_fpscr_rtx ())); get_fpscr_rtx ()));
emit_move_insn (operands[0], gen_rtx_SUBREG (SFmode, fsca, 0)); emit_move_insn (operands[0], gen_rtx_SUBREG (SFmode, fsca, 4));
emit_move_insn (operands[1], gen_rtx_SUBREG (SFmode, fsca, 4)); emit_move_insn (operands[1], gen_rtx_SUBREG (SFmode, fsca, 0));
DONE; DONE;
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment