[PATCH,SH] Add SH2A new instructions 6/6

Kaz Kojima kkojima@rr.iij4u.or.jp
Thu Apr 3 09:13:00 GMT 2008


"Naveen H.S." <naveen.hs@kpitcummins.com> wrote:
> The instruction '*iorsi3' is a subset of 'iorsi3_compact' and is
> not getting generated as it is placed later in the order. 

Ah, I've missed it, though depending the order of insns in the .md
file is clearly the wrong way.
We should change the condition of *iorsi3_compact like as:

     * config/sh/sh.md (*iorsi3_compact): Fix condition for SH2A.

--- ORIG/trunk/gcc/config/sh/sh.md	2008-03-25 23:02:13.000000000 +0900
+++ LOCAL/trunk/gcc/config/sh/sh.md	2008-04-03 15:35:33.000000000 +0900
@@ -3246,7 +3246,8 @@ label:
   [(set (match_operand:SI 0 "arith_reg_dest" "=r,z")
 	(ior:SI (match_operand:SI 1 "arith_reg_operand" "%0,0")
 		(match_operand:SI 2 "logical_operand" "r,K08")))]
-  "TARGET_SH1"
+  "TARGET_SH1
+   && !(TARGET_SH2A && satisfies_constraint_Pso (operands[2]))"
   "or	%2,%0"
   [(set_attr "type" "arith")])
 
though I don't test it at all.
Could you test your patch with such change?

Regards,
	kaz



More information about the Gcc-patches mailing list