(mips_expand_prologue): If tsize_rtx is large_int...
authorJim Wilson <wilson@gcc.gnu.org>
Mon, 16 Jun 1997 00:45:02 +0000 (17:45 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Mon, 16 Jun 1997 00:45:02 +0000 (17:45 -0700)
(mips_expand_prologue): If tsize_rtx is large_int, emit two
insns instead of one splitable insn, setting RTX_FRAME_RELATED_P.

From-SVN: r14249

gcc/config/mips/mips.c

index b97e0f65710ab4b2ebef55093bf71d08ced1cb3e..fee0408a8d0b7ecf6690997963f122e7ebcd0f13 100644 (file)
@@ -5443,8 +5443,25 @@ mips_expand_prologue ()
          if (tsize > 32767)
            {
              tmp_rtx = gen_rtx (REG, Pmode, MIPS_TEMP1_REGNUM);
-             insn = emit_move_insn (tmp_rtx, tsize_rtx);
-             RTX_FRAME_RELATED_P (insn) = 1;
+
+             /* Instruction splitting doesn't preserve the RTX_FRAME_RELATED_P
+                bit, so make sure that we don't emit anything that can be
+                split.  */
+             if (large_int (tsize_rtx))
+               {
+                 insn = emit_move_insn (tmp_rtx,
+                                        GEN_INT (tsize & 0xffff0000));
+                 RTX_FRAME_RELATED_P (insn) = 1;
+                 insn = emit_insn (gen_iorsi3 (tmp_rtx, tmp_rtx,
+                                               GEN_INT (tsize & 0x0000ffff)));
+                 RTX_FRAME_RELATED_P (insn) = 1;
+               }
+             else
+               {
+                 insn = emit_move_insn (tmp_rtx, tsize_rtx);
+                 RTX_FRAME_RELATED_P (insn) = 1;
+               }
+
              tsize_rtx = tmp_rtx;
            }