]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
mips.c (mips_set_mips16_mode): Use separate anchor settings for MIPS16.
authorRichard Sandiford <richard@codesourcery.com>
Tue, 11 Sep 2007 10:18:35 +0000 (10:18 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 11 Sep 2007 10:18:35 +0000 (10:18 +0000)
gcc/
* config/mips/mips.c (mips_set_mips16_mode): Use separate anchor
settings for MIPS16.
(mips_use_anchors_for_symbol_p): Use default_use_anchors_for_symbol_p.

From-SVN: r128366

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

index 470e25478dba65e4d3ef9d187af3b60b79bf6a10..1c9a5d01144d551db4529085f26f6a893e8eea50 100644 (file)
@@ -1,3 +1,9 @@
+2007-09-11  Richard Sandiford  <richard@codesourcery.com>
+
+       * config/mips/mips.c (mips_set_mips16_mode): Use separate anchor
+       settings for MIPS16.
+       (mips_use_anchors_for_symbol_p): Use default_use_anchors_for_symbol_p.
+
 2007-09-11  Richard Sandiford  <richard@codesourcery.com>
 
        * config/mips/mips.c (mips_symbol_insns_1): Allow LEAs of
index 0e69827296d08cb8c315d5ea4f37445974aeae7a..289f46e18bc4d1eceb7921feafbdda07682cf162 100644 (file)
@@ -5655,6 +5655,14 @@ mips_set_mips16_mode (int mips16_p)
       /* Silently disable DSP extensions.  */
       target_flags &= ~MASK_DSP;
       target_flags &= ~MASK_DSPR2;
+
+      /* Experiments suggest we get the best overall results from using
+        the range of an unextended lw or sw.  Code that makes heavy use
+        of byte or short accesses can do better with ranges of 0...31
+        and 0...63 respectively, but most code is sensitive to the range
+        of lw and sw instead.  */
+      targetm.min_anchor_offset = 0;
+      targetm.max_anchor_offset = 127;
     }
   else 
     {
@@ -5676,6 +5684,9 @@ mips_set_mips16_mode (int mips16_p)
          if (align_functions == 0)
            align_functions = 8;
        }
+
+      targetm.min_anchor_offset = TARGET_MIN_ANCHOR_OFFSET;
+      targetm.max_anchor_offset = TARGET_MAX_ANCHOR_OFFSET;
     }
 
   /* (Re)initialize mips target internals for new ISA.  */
@@ -8920,7 +8931,7 @@ mips_use_anchors_for_symbol_p (const_rtx symbol)
       return false;
 
     default:
-      return true;
+      return default_use_anchors_for_symbol_p (symbol);
     }
 }
 \f