public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [M32R] Use match_test rather than eq/ne symbol_ref
@ 2011-09-13 17:57 Richard Sandiford
  2011-09-26 13:27 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Sandiford @ 2011-09-13 17:57 UTC (permalink / raw)
  To: gcc-patches; +Cc: nickc

As per the subject.  Tested by making sure that there were no new
warnings building m32r-elf, and that there were no changes in the
assembly output for the C and C++ testsuite.  OK to install?

Richard


gcc/
	* config/m32r/m32r.md: Use match_test rather than eq/ne symbol_ref
	throughout file.

Index: gcc/config/m32r/m32r.md
===================================================================
--- gcc/config/m32r/m32r.md	2011-09-13 18:43:39.000000000 +0100
+++ gcc/config/m32r/m32r.md	2011-09-13 18:53:40.000000000 +0100
@@ -69,9 +69,9 @@ (define_attr "insn_size" "short,long"
 
 ;; The target CPU we're compiling for.
 (define_attr "cpu" "m32r,m32r2,m32rx"
-  (cond [(ne (symbol_ref "TARGET_M32RX") (const_int 0))
+  (cond [(match_test "TARGET_M32RX")
 	     (const_string "m32rx")
-	 (ne (symbol_ref "TARGET_M32R2") (const_int 0))
+	 (match_test "TARGET_M32R2")
 	     (const_string "m32r2")]
     (const_string "m32r")))
 
@@ -2012,8 +2012,7 @@ (define_insn "*call_via_label"
 }"
   [(set_attr "type" "call")
    (set (attr "length")
-	(if_then_else (eq (symbol_ref "call26_operand (operands[0], FUNCTION_MODE)")
-			  (const_int 0))
+	(if_then_else (not (match_test "call26_operand (operands[0], FUNCTION_MODE)"))
 		      (const_int 12) ; 10 + 2 for nop filler
 		      ; The return address must be on a 4 byte boundary so
 		      ; there's no point in using a value of 2 here.  A 2 byte
@@ -2072,8 +2071,7 @@ (define_insn "*call_value_via_label"
 }"
   [(set_attr "type" "call")
    (set (attr "length")
-	(if_then_else (eq (symbol_ref "call26_operand (operands[1], FUNCTION_MODE)")
-			  (const_int 0))
+	(if_then_else (not (match_test "call26_operand (operands[1], FUNCTION_MODE)"))
 		      (const_int 12) ; 10 + 2 for nop filler
 		      ; The return address must be on a 4 byte boundary so
 		      ; there's no point in using a value of 2 here.  A 2 byte

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [M32R] Use match_test rather than eq/ne symbol_ref
  2011-09-13 17:57 [M32R] Use match_test rather than eq/ne symbol_ref Richard Sandiford
@ 2011-09-26 13:27 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2011-09-26 13:27 UTC (permalink / raw)
  To: gcc-patches, rdsandiford

Hi Richard,

> gcc/
> 	* config/m32r/m32r.md: Use match_test rather than eq/ne symbol_ref
> 	throughout file.

Approved - please apply.

Cheers
   Nick

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-26 12:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-13 17:57 [M32R] Use match_test rather than eq/ne symbol_ref Richard Sandiford
2011-09-26 13:27 ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).