diff mbox

[committed] Fix incorrect mode used in pa_expand_prologue

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

Commit Message

John David Anglin Sept. 14, 2013, 9:17 p.m. UTC
The attached change fixes a bug in pa_expand_prologue.  The mode  
argument in the calls
to "gen_rtx_POST_INC" should be the same as "tmpreg" (word_mode).

Tested on hppa2.0w-hp-hpux11.11, hppa64-hp-hpux11.11 and hppa-unknown- 
linux-gnu.
Committed to trunk, 4.8 and 4.7.

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

	PR target/58382
	* config/pa/pa.c (pa_expand_prologue): Change mode in gen_rtx_POST_INC
	calls to word_mode.
diff mbox

Patch

Index: config/pa/pa.c
===================================================================
--- config/pa/pa.c	(revision 202481)
+++ config/pa/pa.c	(working copy)
@@ -4035,7 +4041,8 @@ 
 	      || (! TARGET_64BIT && df_regs_ever_live_p (i + 1)))
 	    {
 	      rtx addr, insn, reg;
-	      addr = gen_rtx_MEM (DFmode, gen_rtx_POST_INC (DFmode, tmpreg));
+	      addr = gen_rtx_MEM (DFmode,
+				  gen_rtx_POST_INC (word_mode, tmpreg));
 	      reg = gen_rtx_REG (DFmode, i);
 	      insn = emit_move_insn (addr, reg);
 	      if (DO_FRAME_NOTES)
@@ -4328,7 +4335,8 @@ 
 	if (df_regs_ever_live_p (i)
 	    || (! TARGET_64BIT && df_regs_ever_live_p (i + 1)))
 	  {
-	    rtx src = gen_rtx_MEM (DFmode, gen_rtx_POST_INC (DFmode, tmpreg));
+	    rtx src = gen_rtx_MEM (DFmode,
+				   gen_rtx_POST_INC (word_mode, tmpreg));
 	    rtx dest = gen_rtx_REG (DFmode, i);
 	    emit_move_insn (dest, src);
 	  }