]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
mips.h (TARGET_GPWORD): Return false for TARGET_NEWABI && TARGET_IRIX.
authorRichard Sandiford <rsandifo@redhat.com>
Tue, 10 Feb 2004 10:17:47 +0000 (10:17 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 10 Feb 2004 10:17:47 +0000 (10:17 +0000)
* config/mips/mips.h (TARGET_GPWORD): Return false for TARGET_NEWABI
&& TARGET_IRIX.

From-SVN: r77589

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

index 0475bee9baa00e572e1245c59e763cfbabe6700f..af67fe4b3856c0e4fb2e11ed90e0c6faab2e7585 100644 (file)
@@ -1,3 +1,8 @@
+2004-02-10  Richard Sandiford  <rsandifo@redhat.com>
+
+       * config/mips/mips.h (TARGET_GPWORD): Return false for TARGET_NEWABI
+       && TARGET_IRIX.
+
 2004-02-09  Ziemowit Laski  <zlaski@apple.com>
 
        * objc/objc-act.c (get_super_receiver): Move '#ifdef OBJCPLUS'
index f53d04c442b5fa104c71fe7a343534f8cb888f08..90e8954e56987e4cdb66f4d569f72fd47b073423 100644 (file)
@@ -290,9 +290,22 @@ extern const struct mips_cpu_info *mips_tune_info;
   (!TARGET_MIPS16 && (!TARGET_ABICALLS || TARGET_EXPLICIT_RELOCS))
 
 /* True if .gpword or .gpdword should be used for switch tables.
-   Not all SGI assemblers support this.  */
+   There are some problems with using these directives with the
+   native IRIX tools:
 
-#define TARGET_GPWORD (TARGET_ABICALLS && (!TARGET_NEWABI || TARGET_GAS))
+      - It has been reported that some versions of the native n32
+       assembler mishandle .gpword, complaining that symbols are
+       global when they are in fact local.
+
+      - The native assemblers don't understand .gpdword.
+
+      - Although GAS does understand .gpdword, the native linker
+       mishandles the relocations GAS generates (R_MIPS_GPREL32
+       followed by R_MIPS_64).
+
+   We therefore disable GP-relative switch tables for n32 and n64
+   on IRIX targets.  */
+#define TARGET_GPWORD (TARGET_ABICALLS && !(TARGET_NEWABI && TARGET_IRIX))
 
                                        /* Generate mips16 code */
 #define TARGET_MIPS16          (target_flags & MASK_MIPS16)