------- Comment #2 from kkojima at gcc dot gnu dot org 2006-06-22 04:16 ------- Although I don't know much about the instruction scheduling, I had a similar problem on SH and it was workarounded with emitting blockage insns. The patch below might work for you, though I'm not sure if it's the right thing to do. Ian's comment in the gcc list http://gcc.gnu.org/ml/gcc/2006-06/msg00669.html suggests us that there are more than one problem.
--- ORIG/gcc-4_1-branch/gcc/config/mips/mips.c 2006-06-20 10:53:21.000000000 +0900 +++ TMP/gcc-4_1-branch/gcc/config/mips/mips.c 2006-06-22 12:49:26.000000000 +0900 @@ -1995,6 +1995,7 @@ mips_legitimize_tls_address (rtx loc) case TLS_MODEL_INITIAL_EXEC: tmp1 = gen_reg_rtx (Pmode); tmp2 = mips_unspec_address (loc, SYMBOL_GOTTPREL); + emit_insn (gen_blockage ()); if (Pmode == DImode) { emit_insn (gen_tls_get_tp_di (v1)); @@ -2011,6 +2012,7 @@ mips_legitimize_tls_address (rtx loc) case TLS_MODEL_LOCAL_EXEC: + emit_insn (gen_blockage ()); if (Pmode == DImode) emit_insn (gen_tls_get_tp_di (v1)); else -- kkojima at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kkojima at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28126