This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
i386.md cleanup
- To: patches at x86-64 dot org, rth at cygnus dot com, gcc-patches at gcc dot gnu dot org
- Subject: i386.md cleanup
- From: Jan Hubicka <jh at suse dot cz>
- Date: Wed, 28 Feb 2001 20:12:58 +0100
Hi,
Now when we do post-reload splitting unconditionally on i386, we can kill some redundancy.
Wed Feb 28 20:11:38 CET 2001 Jan Hubicka <jh@suse.cz>
* i386.md (push?f): Use '#' in template.
(trunc?f?f): Likewise.
Index: i386.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.md,v
retrieving revision 1.227
diff -c -3 -p -r1.227 i386.md
*** i386.md 2001/02/28 18:34:35 1.227
--- i386.md 2001/02/28 19:11:13
***************
*** 2155,2172 ****
{
switch (which_alternative)
{
- case 0:
- /* %%% We loose REG_DEAD notes for controling pops if we split late. */
- operands[0] = gen_rtx_MEM (SFmode, stack_pointer_rtx);
- operands[2] = stack_pointer_rtx;
- operands[3] = GEN_INT (4);
- if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
- return \"sub{l}\\t{%3, %2|%2, %3}\;fstp%z0\\t%y0\";
- else
- return \"sub{l}\\t{%3, %2|%2, %3}\;fst%z0\\t%y0\";
-
case 1:
return \"push{l}\\t%1\";
case 2:
return \"#\";
--- 2155,2163 ----
{
switch (which_alternative)
{
case 1:
return \"push{l}\\t%1\";
+ case 0:
case 2:
return \"#\";
***************
*** 2285,2313 ****
[(set (match_operand:DF 0 "push_operand" "=<,<,<,<")
(match_operand:DF 1 "general_no_elim_operand" "f#Y,Fo#fY,*r#fY,Y#f"))]
"!TARGET_INTEGER_DFMODE_MOVES"
! "*
! {
! switch (which_alternative)
! {
! case 0:
! /* %%% We loose REG_DEAD notes for controling pops if we split late. */
! operands[0] = gen_rtx_MEM (DFmode, stack_pointer_rtx);
! operands[2] = stack_pointer_rtx;
! operands[3] = GEN_INT (8);
! if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
! return \"sub{l}\\t{%3, %2|%2, %3}\;fstp%z0\\t%y0\";
! else
! return \"sub{l}\\t{%3, %2|%2, %3}\;fst%z0\\t%y0\";
!
! case 1:
! case 2:
! case 3:
! return \"#\";
!
! default:
! abort ();
! }
! }"
[(set_attr "type" "multi")
(set_attr "mode" "DF,SI,SI,DF")])
--- 2276,2282 ----
[(set (match_operand:DF 0 "push_operand" "=<,<,<,<")
(match_operand:DF 1 "general_no_elim_operand" "f#Y,Fo#fY,*r#fY,Y#f"))]
"!TARGET_INTEGER_DFMODE_MOVES"
! "#"
[(set_attr "type" "multi")
(set_attr "mode" "DF,SI,SI,DF")])
***************
*** 2315,2342 ****
[(set (match_operand:DF 0 "push_operand" "=<,<,<")
(match_operand:DF 1 "general_no_elim_operand" "f#rY,rFo#fY,Y#rf"))]
"TARGET_INTEGER_DFMODE_MOVES"
! "*
! {
! switch (which_alternative)
! {
! case 0:
! /* %%% We loose REG_DEAD notes for controling pops if we split late. */
! operands[0] = gen_rtx_MEM (DFmode, stack_pointer_rtx);
! operands[2] = stack_pointer_rtx;
! operands[3] = GEN_INT (8);
! if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
! return \"sub{l}\\t{%3, %2|%2, %3}\;fstp%z0\\t%y0\";
! else
! return \"sub{l}\\t{%3, %2|%2, %3}\;fst%z0\\t%y0\";
!
! case 1:
! case 2:
! return \"#\";
!
! default:
! abort ();
! }
! }"
[(set_attr "type" "multi")
(set_attr "mode" "DF,SI,DF")])
--- 2284,2290 ----
[(set (match_operand:DF 0 "push_operand" "=<,<,<")
(match_operand:DF 1 "general_no_elim_operand" "f#rY,rFo#fY,Y#rf"))]
"TARGET_INTEGER_DFMODE_MOVES"
! "#"
[(set_attr "type" "multi")
(set_attr "mode" "DF,SI,DF")])
***************
*** 2531,2558 ****
[(set (match_operand:XF 0 "push_operand" "=<,<,<")
(match_operand:XF 1 "general_no_elim_operand" "f,Fo,*r"))]
"optimize_size"
! "*
! {
! switch (which_alternative)
! {
! case 0:
! /* %%% We loose REG_DEAD notes for controling pops if we split late. */
! operands[0] = gen_rtx_MEM (XFmode, stack_pointer_rtx);
! operands[2] = stack_pointer_rtx;
! operands[3] = GEN_INT (12);
! if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
! return \"sub{l}\\t{%3, %2|%2, %3}\;fstp%z0\\t%y0\";
! else
! return \"sub{l}\\t{%3, %2|%2, %3}\;fst%z0\\t%y0\";
!
! case 1:
! case 2:
! return \"#\";
!
! default:
! abort ();
! }
! }"
[(set_attr "type" "multi")
(set_attr "mode" "XF,SI,SI")])
--- 2479,2485 ----
[(set (match_operand:XF 0 "push_operand" "=<,<,<")
(match_operand:XF 1 "general_no_elim_operand" "f,Fo,*r"))]
"optimize_size"
! "#"
[(set_attr "type" "multi")
(set_attr "mode" "XF,SI,SI")])
***************
*** 2560,2587 ****
[(set (match_operand:TF 0 "push_operand" "=<,<,<")
(match_operand:TF 1 "general_no_elim_operand" "f,Fo,*r"))]
"optimize_size"
! "*
! {
! switch (which_alternative)
! {
! case 0:
! /* %%% We loose REG_DEAD notes for controling pops if we split late. */
! operands[0] = gen_rtx_MEM (XFmode, stack_pointer_rtx);
! operands[2] = stack_pointer_rtx;
! operands[3] = GEN_INT (16);
! if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
! return \"sub{l}\\t{%3, %2|%2, %3}\;fstp%z0\\t%y0\";
! else
! return \"sub{l}\\t{%3, %2|%2, %3}\;fst%z0\\t%y0\";
!
! case 1:
! case 2:
! return \"#\";
!
! default:
! abort ();
! }
! }"
[(set_attr "type" "multi")
(set_attr "mode" "XF,SI,SI")])
--- 2487,2493 ----
[(set (match_operand:TF 0 "push_operand" "=<,<,<")
(match_operand:TF 1 "general_no_elim_operand" "f,Fo,*r"))]
"optimize_size"
! "#"
[(set_attr "type" "multi")
(set_attr "mode" "XF,SI,SI")])
***************
*** 2589,2615 ****
[(set (match_operand:XF 0 "push_operand" "=<,<")
(match_operand:XF 1 "general_no_elim_operand" "f#r,rFo#f"))]
"!optimize_size"
! "*
! {
! switch (which_alternative)
! {
! case 0:
! /* %%% We loose REG_DEAD notes for controling pops if we split late. */
! operands[0] = gen_rtx_MEM (XFmode, stack_pointer_rtx);
! operands[2] = stack_pointer_rtx;
! operands[3] = GEN_INT (12);
! if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
! return \"sub{l}\\t{%3, %2|%2, %3}\;fstp%z0\\t%y0\";
! else
! return \"sub{l}\\t{%3, %2|%2, %3}\;fst%z0\\t%y0\";
!
! case 1:
! return \"#\";
!
! default:
! abort ();
! }
! }"
[(set_attr "type" "multi")
(set_attr "mode" "XF,SI")])
--- 2495,2501 ----
[(set (match_operand:XF 0 "push_operand" "=<,<")
(match_operand:XF 1 "general_no_elim_operand" "f#r,rFo#f"))]
"!optimize_size"
! "#"
[(set_attr "type" "multi")
(set_attr "mode" "XF,SI")])
***************
*** 2617,2643 ****
[(set (match_operand:TF 0 "push_operand" "=<,<")
(match_operand:TF 1 "general_no_elim_operand" "f#r,rFo#f"))]
"!optimize_size"
! "*
! {
! switch (which_alternative)
! {
! case 0:
! /* %%% We loose REG_DEAD notes for controling pops if we split late. */
! operands[0] = gen_rtx_MEM (XFmode, stack_pointer_rtx);
! operands[2] = stack_pointer_rtx;
! operands[3] = GEN_INT (16);
! if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
! return \"sub{l}\\t{%3, %2|%2, %3}\;fstp%z0\\t%y0\";
! else
! return \"sub{l}\\t{%3, %2|%2, %3}\;fst%z0\\t%y0\";
!
! case 1:
! return \"#\";
!
! default:
! abort ();
! }
! }"
[(set_attr "type" "multi")
(set_attr "mode" "XF,SI")])
--- 2503,2509 ----
[(set (match_operand:TF 0 "push_operand" "=<,<")
(match_operand:TF 1 "general_no_elim_operand" "f#r,rFo#f"))]
"!optimize_size"
! "#"
[(set_attr "type" "multi")
(set_attr "mode" "XF,SI")])
***************
*** 3606,3625 ****
(match_operand:DF 1 "register_operand" "f,0")))
(clobber (match_operand:SF 2 "memory_operand" "=X,m"))]
"TARGET_80387 && !TARGET_SSE2"
! "*
! {
! switch (which_alternative)
! {
! case 0:
! if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
! return \"fstp%z0\\t%y0\";
! else
! return \"fst%z0\\t%y0\";
! case 1:
! return \"fstp%z2\\t%y2\;fld%z2\\t%y2\";
! }
! abort ();
! }"
[(set_attr "type" "fmov,multi")
(set_attr "mode" "SF,SF")])
--- 3472,3478 ----
(match_operand:DF 1 "register_operand" "f,0")))
(clobber (match_operand:SF 2 "memory_operand" "=X,m"))]
"TARGET_80387 && !TARGET_SSE2"
! "#"
[(set_attr "type" "fmov,multi")
(set_attr "mode" "SF,SF")])
***************
*** 3629,3651 ****
(match_operand:DF 1 "nonimmediate_operand" "f,0,mY")))
(clobber (match_operand:SF 2 "memory_operand" "=X,m,X"))]
"TARGET_80387 && TARGET_SSE2"
! "*
! {
! switch (which_alternative)
! {
! case 0:
! if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
! return \"fstp%z0\\t%y0\";
! else
! return \"fst%z0\\t%y0\";
! case 1:
! return \"fstp%z2\\t%y2\;fld%z2\\t%y2\";
! case 2:
! case 3:
! return \"cvtsd2ss\\t{%1, %0|%0, %1}\";
! }
! abort ();
! }"
[(set_attr "type" "fmov,multi,sse")
(set_attr "mode" "SF,SF,DF")])
--- 3482,3488 ----
(match_operand:DF 1 "nonimmediate_operand" "f,0,mY")))
(clobber (match_operand:SF 2 "memory_operand" "=X,m,X"))]
"TARGET_80387 && TARGET_SSE2"
! "#"
[(set_attr "type" "fmov,multi,sse")
(set_attr "mode" "SF,SF,DF")])
***************
*** 3738,3757 ****
(match_operand:XF 1 "register_operand" "f,0")))
(clobber (match_operand:SF 2 "memory_operand" "=m,m"))]
"TARGET_80387"
! "*
! {
! switch (which_alternative)
! {
! case 0:
! if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
! return \"fstp%z0\\t%y0\";
! else
! return \"fst%z0\\t%y0\";
! case 1:
! return \"fstp%z2\\t%y2\;fld%z2\\t%y2\";
! }
! abort ();
! }"
[(set_attr "type" "fmov,multi")
(set_attr "mode" "SF")])
--- 3575,3581 ----
(match_operand:XF 1 "register_operand" "f,0")))
(clobber (match_operand:SF 2 "memory_operand" "=m,m"))]
"TARGET_80387"
! "#"
[(set_attr "type" "fmov,multi")
(set_attr "mode" "SF")])
***************
*** 3803,3822 ****
(match_operand:TF 1 "register_operand" "f,0")))
(clobber (match_operand:SF 2 "memory_operand" "=m,m"))]
"TARGET_80387"
! "*
! {
! switch (which_alternative)
! {
! case 0:
! if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
! return \"fstp%z0\\t%y0\";
! else
! return \"fst%z0\\t%y0\";
! case 1:
! return \"fstp%z2\\t%y2\;fld%z2\\t%y2\";
! }
! abort ();
! }"
[(set_attr "type" "fmov,multi")
(set_attr "mode" "SF")])
--- 3627,3633 ----
(match_operand:TF 1 "register_operand" "f,0")))
(clobber (match_operand:SF 2 "memory_operand" "=m,m"))]
"TARGET_80387"
! "#"
[(set_attr "type" "fmov,multi")
(set_attr "mode" "SF")])
***************
*** 3869,3888 ****
(match_operand:XF 1 "register_operand" "f,0")))
(clobber (match_operand:DF 2 "memory_operand" "=m,m"))]
"TARGET_80387"
! "*
! {
! switch (which_alternative)
! {
! case 0:
! if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
! return \"fstp%z0\\t%y0\";
! else
! return \"fst%z0\\t%y0\";
! case 1:
! return \"fstp%z2\\t%y2\;fld%z2\\t%y2\";
! }
! abort ();
! }"
[(set_attr "type" "fmov,multi")
(set_attr "mode" "DF")])
--- 3680,3686 ----
(match_operand:XF 1 "register_operand" "f,0")))
(clobber (match_operand:DF 2 "memory_operand" "=m,m"))]
"TARGET_80387"
! "#"
[(set_attr "type" "fmov,multi")
(set_attr "mode" "DF")])
***************
*** 3934,3953 ****
(match_operand:TF 1 "register_operand" "f,0")))
(clobber (match_operand:DF 2 "memory_operand" "=m,m"))]
"TARGET_80387"
! "*
! {
! switch (which_alternative)
! {
! case 0:
! if (find_regno_note (insn, REG_DEAD, REGNO (operands[1])))
! return \"fstp%z0\\t%y0\";
! else
! return \"fst%z0\\t%y0\";
! case 1:
! return \"fstp%z2\\t%y2\;fld%z2\\t%y2\";
! }
! abort ();
! }"
[(set_attr "type" "fmov,multi")
(set_attr "mode" "DF")])
--- 3732,3738 ----
(match_operand:TF 1 "register_operand" "f,0")))
(clobber (match_operand:DF 2 "memory_operand" "=m,m"))]
"TARGET_80387"
! "#"
[(set_attr "type" "fmov,multi")
(set_attr "mode" "DF")])