This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[m32c] Avoid genrecog warning


I have a patch to upgrade most genrecog warnings into errors.  This patch
fixes one for m32c about stzx_16 and stzx_24_<mode> allowing constant integers
as destinations (as in, that's what the predicates would accept).

Tested by building m32c-elf with the warnings turned to errors, and by
comparing the before and after assembly output at -O2 for gcc.c-torture,
gcc.dg and g++.dg.  OK to install?

Thanks,
Richard


gcc/
	* config/m32c/cond.md (stzx_16): Use register_operand for operand 0.
	(stzx_24_<mode>): Likewise mra_operand.

Index: gcc/config/m32c/cond.md
===================================================================
--- gcc/config/m32c/cond.md	2013-11-16 21:52:15.083787117 +0000
+++ gcc/config/m32c/cond.md	2013-11-16 21:58:58.823042647 +0000
@@ -75,7 +75,7 @@ (define_insn "bcc_op"
 )
 
 (define_insn "stzx_16"
-  [(set (match_operand:QI 0 "mrai_operand" "=R0w,R0w,R0w")
+  [(set (match_operand:QI 0 "register_operand" "=R0w,R0w,R0w")
 	(if_then_else:QI (eq (reg:CC FLG_REGNO) (const_int 0))
 			 (match_operand:QI 1 "const_int_operand" "i,i,0")
 			 (match_operand:QI 2 "const_int_operand" "i,0,i")))]
@@ -88,7 +88,7 @@ (define_insn "stzx_16"
 )
 
 (define_insn "stzx_24_<mode>"
-  [(set (match_operand:QHI 0 "mrai_operand" "=RraSd,RraSd,RraSd")
+  [(set (match_operand:QHI 0 "mra_operand" "=RraSd,RraSd,RraSd")
 	(if_then_else:QHI (eq (reg:CC FLG_REGNO) (const_int 0))
 			 (match_operand:QHI 1 "const_int_operand" "i,i,0")
 			 (match_operand:QHI 2 "const_int_operand" "i,0,i")))]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]