]> gcc.gnu.org Git - gcc.git/commitdiff
re PR target/18447 (Variable with the initial-exec tls-model attribute causes spill...
authorKaz Kojima <kkojima@gcc.gnu.org>
Tue, 16 Nov 2004 12:16:52 +0000 (12:16 +0000)
committerKaz Kojima <kkojima@gcc.gnu.org>
Tue, 16 Nov 2004 12:16:52 +0000 (12:16 +0000)
PR target/18447
* config/sh/sh.c (prepare_move_operands): Emit blockage insns
before and after the insns for getting GOT address in non-PIC
TLS_MODEL_INITIAL_EXEC tls sequence when the first scheduling
is enabled.

From-SVN: r90732

gcc/ChangeLog
gcc/config/sh/sh.c

index e966816da29357e66e317b5a7bbda68b0f0361d1..521c31b09e6c23ba599f21e61a5ea732b17c158a 100644 (file)
@@ -1,3 +1,11 @@
+2004-11-16  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       PR target/18447
+       * config/sh/sh.c (prepare_move_operands): Emit blockage insns
+       before and after the insns for getting GOT address in non-PIC
+       TLS_MODEL_INITIAL_EXEC tls sequence when the first scheduling
+       is enabled.
+
 2004-11-16  Andreas Krebbel  <krebbel1@de.ibm.com>
 
        * gcc/cse.c (struct change_cc_mode_args): New structure.
index 699f316064e0a140a152e376a62f39c01c68558a..c4c1e1632cd6933816e47c7ac4ab6b6fbbbeede0 100644 (file)
@@ -1042,9 +1042,16 @@ prepare_move_operands (rtx operands[], enum machine_mode mode)
            case TLS_MODEL_INITIAL_EXEC:
              if (! flag_pic)
                {
+                 /* Don't schedule insns for getting GOT address when
+                    the first scheduling is enabled, to avoid spill
+                    failures for R0.  */
+                 if (flag_schedule_insns)
+                   emit_insn (gen_blockage ());
                  emit_insn (gen_GOTaddr2picreg ());
                  emit_insn (gen_rtx_USE (VOIDmode, gen_rtx_REG (SImode,
                                                                 PIC_REG)));
+                 if (flag_schedule_insns)
+                   emit_insn (gen_blockage ());
                }
              tga_op1 = no_new_pseudos ? op0 : gen_reg_rtx (Pmode);
              tmp = gen_sym2GOTTPOFF (op1);
This page took 0.088882 seconds and 5 git commands to generate.