Patchwork [SH] Use braced strings in MD

login
register
mail settings
Submitter Oleg Endo
Date April 7, 2012, 11:48 p.m.
Message ID <1333842486.19154.96.camel@yam-132-YW-E178-FTW>
Download mbox | patch
Permalink /patch/151333/
State New
Headers show

Comments

Oleg Endo - April 7, 2012, 11:48 p.m.
On Sun, 2012-04-08 at 08:01 +0900, Kaz Kojima wrote:
> Oleg Endo <oleg.endo@t-online.de> wrote:
> > In my original patch 
> > http://gcc.gnu.org/ml/gcc-patches/2012-03/msg01315.html
> > I forgot two cases, which are addressed by the attached patch.
> > Tested with 'make all-gcc'.
> > OK?
> 
> OK.
> 

Just spotted two more of those "{ ... }".
I will commit the attached version of the patch, OK?

Cheers,
Oleg
Kaz Kojima - April 8, 2012, 12:26 a.m.
Oleg Endo <oleg.endo@t-online.de> wrote:
> Just spotted two more of those "{ ... }".
> I will commit the attached version of the patch, OK?

OK.

Regards,
	kaz

Patch

Index: gcc/config/sh/sh.md
===================================================================
--- gcc/config/sh/sh.md	(revision 186214)
+++ gcc/config/sh/sh.md	(working copy)
@@ -909,8 +909,10 @@ 
 		       (match_operand:DI 1 "arith_operand" "r"))
 	       (const_int 0)))]
   "TARGET_SH1"
-  "* return output_branchy_insn (EQ, \"tst\\t%S1,%S0\;bf\\t%l9\;tst\\t%R1,%R0\",
-				 insn, operands);"
+{
+  return output_branchy_insn (EQ, "tst\t%S1,%S0;bf\t%l9;tst\t%R1,%R0",
+			      insn, operands);
+}
   [(set_attr "length" "6")
    (set_attr "type" "arith3b")])
 
@@ -3156,7 +3158,6 @@ 
 	(and:SI (match_operand:SI 1 "logical_reg_operand" "")
 		(match_operand:SI 2 "logical_operand" "")))]
   ""
-  "
 {
   if (TARGET_SH1
       && CONST_INT_P (operands[2]) && INTVAL (operands[2]) == 255)
@@ -3165,7 +3166,7 @@ 
 				       gen_lowpart (QImode, operands[1])));
       DONE;
     }
-}")
+})
 
 (define_insn_and_split "anddi3"
   [(set (match_operand:DI 0 "arith_reg_dest" "=r,r,r")
@@ -3179,14 +3180,13 @@ 
   "reload_completed
    && ! logical_operand (operands[2], DImode)"
   [(const_int 0)]
-  "
 {
   if ((unsigned)INTVAL (operands[2]) == (unsigned) 0xffffffff)
     emit_insn (gen_mshflo_l_di (operands[0], operands[1], CONST0_RTX (DImode)));
   else
     emit_insn (gen_mshfhi_l_di (operands[0], CONST0_RTX (DImode), operands[1]));
   DONE;
-}"
+}
   [(set_attr "type" "arith_media")])
 
 (define_insn "andcsi3"
@@ -5638,7 +5638,9 @@ 
   "TARGET_SH1
    && (arith_reg_operand (operands[0], DImode)
        || arith_reg_operand (operands[1], DImode))"
-  "* return output_movedouble (insn, operands, DImode);"
+{
+  return output_movedouble (insn, operands, DImode);
+}
   [(set_attr "length" "4")
    (set_attr "type" "pcload,move,load,store,move,pcload,move,move")])