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.ang...@bell.net


2013-09-14  John David Anglin  <dang...@gcc.gnu.org>

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

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);
          }

Reply via email to