Patchwork [rx] fix bitclr output constraints

login
register
mail settings
Submitter DJ Delorie
Date Aug. 27, 2010, 12:55 a.m.
Message ID <201008270055.o7R0tw84025872@greed.delorie.com>
Download mbox | patch
Permalink /patch/62818/
State New
Headers show

Comments

DJ Delorie - Aug. 27, 2010, 12:55 a.m.
The bitset patterns had "=r" but these didn't, causing reload
failures.  Ok to apply?

	* config/rx/rx.md (bitclr): Don't mark the output as early-clobber.
	(bitclr_in_memory): Likewise.
Hans-Peter Nilsson - Aug. 27, 2010, 1:29 a.m.
On Thu, 26 Aug 2010, DJ Delorie wrote:

> The bitset patterns had "=r" but these didn't, causing reload
> failures.  Ok to apply?
>
> 	* config/rx/rx.md (bitclr): Don't mark the output as early-clobber.
> 	(bitclr_in_memory): Likewise.

Nitwit comment, to avoid spreading confusion among observers (as
nobody reads the documentation): "=&r" is earlyclobber, "+r" is
read-write.

> -  [(set:SI (match_operand:SI 0 "register_operand" "+r")
> +  [(set:SI (match_operand:SI 0 "register_operand" "=r")

brgds, H-P
DJ Delorie - Aug. 27, 2010, 1:30 a.m.
Fixed.
Nick Clifton - Aug. 27, 2010, 7:37 a.m.
Hi DJ,

> The bitset patterns had "=r" but these didn't, causing reload
> failures.  Ok to apply?
>
> 	* config/rx/rx.md (bitclr): Don't mark the output as early-clobber.
> 	(bitclr_in_memory): Likewise.

Approved - please apply.

Cheers
   Nick

Patch

Index: gcc/config/rx/rx.md
===================================================================
--- gcc/config/rx/rx.md	(revision 163536)
+++ gcc/config/rx/rx.md	(working copy)
@@ -1366,23 +1366,23 @@ 
 		   (ashift:SI (const_int 1)
 			      (match_dup 1))))]
   ""
 )
 
 (define_insn "bitclr"
-  [(set:SI (match_operand:SI 0 "register_operand" "+r")
+  [(set:SI (match_operand:SI 0 "register_operand" "=r")
 	   (and:SI (match_operand:SI 1 "register_operand" "0")
 		   (not:SI (ashift:SI (const_int 1)
 				      (match_operand:SI 2 "nonmemory_operand" "ri")))))]
   ""
   "bclr\t%2, %0"
   [(set_attr "length" "3")]
 )
 
 (define_insn "bitclr_in_memory"
-  [(set:QI (match_operand:QI 0 "memory_operand" "+m")
+  [(set:QI (match_operand:QI 0 "memory_operand" "=m")
 	   (and:QI (match_operand:QI 1 "memory_operand" "0")
 		   (not:QI (ashift:QI (const_int 1)
 				      (match_operand:QI 2 "nonmemory_operand" "ri")))))]
   ""
   "bclr\t%2, %0.B"
   [(set_attr "length" "3")