public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fix pdp11 building with the current trunk
@ 2017-03-13 17:43 Jeff Law
  0 siblings, 0 replies; only message in thread
From: Jeff Law @ 2017-03-13 17:43 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]


Additional checking of MD files has exposed a bug in the pdp11 backend. 
Namely it has a scratch operand with a lower number than other operands.

This patch adjusts the operand numbers.  I've verified this allows the 
pdp11 backend to build again.  Installed on the trunk.

Jeff


[-- Attachment #2: P --]
[-- Type: text/plain, Size: 1247 bytes --]

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a4cd56f..124dca3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2017-03-13  Jeff Law  <law@redhat.com>
+
+	* config/pdp11/pdp11.md (movmemhi): Adjust operand numbers to
+	match_scratch operand is highest.
+
 2017-03-13  Martin Liska  <mliska@suse.cz>
 
 	PR middle-end/78339
diff --git a/gcc/config/pdp11/pdp11.md b/gcc/config/pdp11/pdp11.md
index ee820f2..dde7711 100644
--- a/gcc/config/pdp11/pdp11.md
+++ b/gcc/config/pdp11/pdp11.md
@@ -373,9 +373,9 @@
 		   (match_operand:BLK 1 "general_operand" "g,g"))
 	      (use (match_operand:HI 2 "general_operand" "n,mr"))
 	      (use (match_operand:HI 3 "immediate_operand" "i,i"))
-	      (clobber (match_scratch:HI 4 "=&r,X"))
+	      (clobber (match_scratch:HI 6 "=&r,X"))
+	      (clobber (match_dup 4))
 	      (clobber (match_dup 5))
-	      (clobber (match_dup 6))
 	      (clobber (match_dup 2))])]
   "(TARGET_BCOPY_BUILTIN)"
   "
@@ -387,8 +387,8 @@
     = replace_equiv_address (operands[1],
 			     copy_to_mode_reg (Pmode, XEXP (operands[1], 0)));
 
-  operands[5] = XEXP (operands[0], 0);
-  operands[6] = XEXP (operands[1], 0);
+  operands[4] = XEXP (operands[0], 0);
+  operands[5] = XEXP (operands[1], 0);
 }")
 
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-13 17:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-13 17:43 Fix pdp11 building with the current trunk Jeff Law

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).