mips.h (CASE_VECTOR_MODE): For not TARGET_MIPS16_SHORT_JUMP_TABLES use ptr_mode.
authorRichard Sandiford <rdsandiford@googlemail.com>
Sat, 25 Aug 2012 21:33:15 +0000 (21:33 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Sat, 25 Aug 2012 21:33:15 +0000 (14:33 -0700)
2012-08-25  Richard Sandiford  <rdsandiford@googlemail.com>
            Andrew Pinski  <apinski@cavium.com>

* config/mips/mips.h (CASE_VECTOR_MODE): For not
TARGET_MIPS16_SHORT_JUMP_TABLES use ptr_mode.
(CASE_VECTOR_SHORTEN_MODE): Likewise.

Co-Authored-By: Andrew Pinski <apinski@cavium.com>
From-SVN: r190670

gcc/ChangeLog
gcc/config/mips/mips.h

index 1a822cb69f0a9acacfb7c2c436628abaa58fc26b..bdddb2ddf7abe4697cd33614490ff86b7cd00d88 100644 (file)
@@ -1,3 +1,10 @@
+2012-08-25  Richard Sandiford  <rdsandiford@googlemail.com>
+            Andrew Pinski  <apinski@cavium.com>
+
+       * config/mips/mips.h (CASE_VECTOR_MODE): For not
+       TARGET_MIPS16_SHORT_JUMP_TABLES use ptr_mode.
+       (CASE_VECTOR_SHORTEN_MODE): Likewise.
+
 2012-08-25  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.h (FP_REG_P): Remove macro.
index 9ff36b3144f8341bf465c8b4cc1abeaff3a8c3a5..08c9f53c6585d960d7d35e982c006f98f184a5bd 100644 (file)
@@ -2336,12 +2336,13 @@ typedef struct mips_args {
 
 #define JUMP_TABLES_IN_TEXT_SECTION TARGET_MIPS16_SHORT_JUMP_TABLES
 
-#define CASE_VECTOR_MODE SImode
+#define CASE_VECTOR_MODE (TARGET_MIPS16_SHORT_JUMP_TABLES ? SImode : ptr_mode)
 
 /* Only use short offsets if their range will not overflow.  */
 #define CASE_VECTOR_SHORTEN_MODE(MIN, MAX, BODY) \
-  (TARGET_MIPS16_SHORT_JUMP_TABLES && ((MIN) >= -32768 && (MAX) < 32768) \
-   ? HImode : SImode)
+  (!TARGET_MIPS16_SHORT_JUMP_TABLES ? ptr_mode \
+   : ((MIN) >= -32768 && (MAX) < 32768) ? HImode \
+   : SImode)
 
 #define CASE_VECTOR_PC_RELATIVE TARGET_MIPS16_SHORT_JUMP_TABLES