* elfxx-mips.c (mips_mach_extends_p): Treat MIPS64 as an extension
authorRichard Sandiford <rdsandiford@googlemail.com>
Mon, 1 Aug 2005 11:59:33 +0000 (11:59 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Mon, 1 Aug 2005 11:59:33 +0000 (11:59 +0000)
of MIPS32 and MIPS64r2 as an extension of MIPS32r2.

bfd/ChangeLog
bfd/elfxx-mips.c
ld/testsuite/ChangeLog
ld/testsuite/ld-mips-elf/mips-elf-flags.exp

index 957841eb104a2faa66a5dd7958fbf5cf133b94fd..cca0de31c054481b686f0140a5c26b4016ecffdf 100644 (file)
@@ -1,3 +1,8 @@
+2005-08-01  Richard Sandiford  <richard@codesourcery.com>
+
+       * elfxx-mips.c (mips_mach_extends_p): Treat MIPS64 as an extension
+       of MIPS32 and MIPS64r2 as an extension of MIPS32r2.
+
 2005-07-30  David Daney  <ddaney@avtrex.com>
 
        * elflink.c (elf_gc_sweep):  Set dynsymcount to correct value.
index 316114e3b8ff7b5be5b1ca71b6f1cfe2ed2cda49..53b5c9ee918c82166e958727afb239b167be1b0e 100644 (file)
@@ -9661,11 +9661,26 @@ mips_mach_extends_p (unsigned long base, unsigned long extension)
 {
   size_t i;
 
-  for (i = 0; extension != base && i < ARRAY_SIZE (mips_mach_extensions); i++)
+  if (extension == base)
+    return TRUE;
+
+  if (base == bfd_mach_mipsisa32
+      && mips_mach_extends_p (bfd_mach_mipsisa64, extension))
+    return TRUE;
+
+  if (base == bfd_mach_mipsisa32r2
+      && mips_mach_extends_p (bfd_mach_mipsisa64r2, extension))
+    return TRUE;
+
+  for (i = 0; i < ARRAY_SIZE (mips_mach_extensions); i++)
     if (extension == mips_mach_extensions[i].extension)
-      extension = mips_mach_extensions[i].base;
+      {
+       extension = mips_mach_extensions[i].base;
+       if (extension == base)
+         return TRUE;
+      }
 
-  return extension == base;
+  return FALSE;
 }
 
 
index f22a81a67107a4ac77d70201f824b79539cb3d29..aa755107a216cb22facc76dae12b18abb5dc9245 100644 (file)
@@ -1,3 +1,7 @@
+2005-08-01  Richard Sandiford  <richard@codesourcery.com>
+
+       * ld-mips/mips-elf-flags.exp: Add more good_combination tests.
+
 2005-07-28  Ben Elliston  <bje@gnu.org>
 
        * lib/ld-lib.exp (run_ld_link_exec_tests): Add new parameter
index 50ea39acee82d912eb1ae0321a5fa8191bb8671f..b65e02b1a352d8551f8918f46c8407871e42b555 100644 (file)
@@ -158,3 +158,6 @@ good_combination { "-mips3 -32" "-mips64r2 -32" "-mips64 -32" } { mips64r2 }
 
 good_combination { "-march=vr4120 -mabi=32" "-mips3 -mabi=32" } { 4120 o32 }
 good_combination { "-march=sb1 -mgp32 -32" "-march=4000 -mgp32 -32" } { sb1 o32 }
+good_combination { "-mips32 -mabi=32" "-march=sb1 -mabi=32" } { sb1 o32 }
+good_combination { "-mips64r2 -mabi=32" "-mips32 -mabi=32" } { mips64r2 o32 }
+good_combination { "-mips5 -mabi=o64" "-mips64r2 -mabi=o64" } { mips64r2 o64 }
This page took 0.034617 seconds and 4 git commands to generate.