Patchwork Commit: RX: Fix predicates for restricted memory patterns

login
register
mail settings
Submitter Nick Clifton
Date May 17, 2011, 8:43 a.m.
Message ID <m3mxil1zv6.fsf@redhat.com>
Download mbox | patch
Permalink /patch/95891/
State New
Headers show

Comments

Nick Clifton - May 17, 2011, 8:43 a.m.
Hi Guys,

  I am applying the patch below to fix a minor discrepancy in the rx.md
  file.  Several patterns can only use restricted memory addresses.
  They have the correct Q constraint, but they were using the more
  permissive memory_operand predicate.  The patch fixes these patterns
  by replacing memory_operand with rx_restricted_mem_operand.

Cheers
  Nick

gcc/ChangeLog
2011-05-17  Nick Clifton  <nickc@redhat.com>

	* config/rx/rx.md (bitset_in_memory): Use
	rx_restricted_mem_operand.
	(bitinvert_in_memory): Likewise.
	(bitclr_in_memory): Likewise.

Patch

Index: gcc/config/rx/rx.md
===================================================================
--- gcc/config/rx/rx.md	(revision 173820)
+++ gcc/config/rx/rx.md	(working copy)
@@ -1831,7 +1831,7 @@ 
 )
 
 (define_insn "*bitset_in_memory"
-  [(set (match_operand:QI                    0 "memory_operand" "+Q")
+  [(set (match_operand:QI                    0 "rx_restricted_mem_operand" "+Q")
 	(ior:QI (ashift:QI (const_int 1)
 			   (match_operand:QI 1 "nonmemory_operand" "ri"))
 		(match_dup 0)))]
@@ -1852,7 +1852,7 @@ 
 )
 
 (define_insn "*bitinvert_in_memory"
-  [(set (match_operand:QI 0 "memory_operand" "+Q")
+  [(set (match_operand:QI 0 "rx_restricted_mem_operand" "+Q")
 	(xor:QI (ashift:QI (const_int 1)
 			   (match_operand:QI 1 "nonmemory_operand" "ri"))
 		(match_dup 0)))]
@@ -1875,7 +1875,7 @@ 
 )
 
 (define_insn "*bitclr_in_memory"
-  [(set (match_operand:QI 0 "memory_operand" "+Q")
+  [(set (match_operand:QI 0 "rx_restricted_mem_operand" "+Q")
 	(and:QI (not:QI
 		  (ashift:QI
 		    (const_int 1)