diff mbox

[committed] Work around auto increment/decrement reload issue on PA

Message ID BLU0-SMTP29BD44CC74D4D7DF4F9C9497230@phx.gbl
State New
Headers show

Commit Message

John David Anglin Sept. 21, 2013, 12:18 a.m. UTC
The attached change works around a problem that results in wrong code  
on hppa1.1-*-hpux*.  The wrong
code causes a bootstrap error.  The problem does not occur when  
generating PA2.0 code, or on linux because
the generation of auto increment/decrement instructions is disabled.   
The comment in the code indicates
that this was done on PA2.0 because it is not profitable.

The real problem seems to be in reload.  It appears to handle spills  
for auto increment/decrements insns incorrectly,
sometimes generating the reload insns in the wrong order.  I couldn't  
see any way to correct this in the PA backend
as the insns are emitted independently.

So, I decided to disable the generation of auto increment/decrement  
insns until after reload.

Tested on hppa2.0-hp-hpux11.11, hppa64-hp-hpux11.11 and hppa-unknown- 
linux-gnu.  Bootstrap tested
on hppa1.1-hp-hpux11.11.  Committed to trunk and 4.8.

Dave
--
John David Anglin	dave.anglin@bell.net
2013-09-20  John David Anglin  <danglin@gcc.gnu.org>

	PR middle-end/56791
	* config/pa/pa.c (pa_option_override): Disable auto increment and
	decrement instructions until reload is completed.
diff mbox

Patch

Index: config/pa/pa.c
===================================================================
--- config/pa/pa.c	(revision 202481)
+++ config/pa/pa.c	(working copy)
@@ -513,6 +513,12 @@ 
       write_symbols = NO_DEBUG;
     }
 
+#ifdef AUTO_INC_DEC
+  /* FIXME: Disable auto increment and decrement processing until reload
+     is completed.  See PR middle-end 56791.  */
+  flag_auto_inc_dec = reload_completed;
+#endif
+
   /* We only support the "big PIC" model now.  And we always generate PIC
      code when in 64bit mode.  */
   if (flag_pic == 1 || TARGET_64BIT)