mips.c (mips_legitimize_tls_address): Implement all TLS models in the same way as...
authorRichard Sandiford <richard@codesourcery.com>
Sun, 8 Oct 2006 14:33:22 +0000 (14:33 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Sun, 8 Oct 2006 14:33:22 +0000 (14:33 +0000)
gcc/
* config/mips/mips.c (mips_legitimize_tls_address): Implement
all TLS models in the same way as local exec if !TARGET_ABICALLS.
Remove stray newline.

From-SVN: r117557

gcc/ChangeLog
gcc/config/mips/mips.c

index a06e24a68702b5ddce930fcb098186fca7fea322..e56f7382578aac1076b962357b780c75ac9f2e07 100644 (file)
@@ -1,3 +1,9 @@
+2006-10-08  Richard Sandiford  <richard@codesourcery.com>
+
+       * config/mips/mips.c (mips_legitimize_tls_address): Implement
+       all TLS models in the same way as local exec if !TARGET_ABICALLS.
+       Remove stray newline.
+
 2006-10-08  Richard Sandiford  <richard@codesourcery.com>
 
        * config/mips/mips.c (mips_classify_symbol): Do not return
index 54fc3e1c47c2c2fe3fcf5d07d8cb837cfba5fd2b..6ff25620dbe3e7a0dabae3737953c5ef62bfa653 100644 (file)
@@ -2036,6 +2036,11 @@ mips_legitimize_tls_address (rtx loc)
   v1 = gen_rtx_REG (Pmode, GP_RETURN + 1);
 
   model = SYMBOL_REF_TLS_MODEL (loc);
+  /* Only TARGET_ABICALLS code can have more than one module; other
+     code must be be static and should not use a GOT.  All TLS models
+     reduce to local exec in this situation.  */
+  if (!TARGET_ABICALLS)
+    model = TLS_MODEL_LOCAL_EXEC;
 
   switch (model)
     {
@@ -2078,7 +2083,6 @@ mips_legitimize_tls_address (rtx loc)
       break;
 
     case TLS_MODEL_LOCAL_EXEC:
-
       if (Pmode == DImode)
        emit_insn (gen_tls_get_tp_di (v1));
       else