aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2005-08-01 11:59:33 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2005-08-01 11:59:33 +0000
commitc5211a5487be06a0bc2172036a8a426b00c0d427 (patch)
tree8936a9bfe37d7732e24b8053fccb51e8a1da7854 /bfd/elfxx-mips.c
parent77e0b926c11f74a3f7d4029dcdde8e5e722f0cae (diff)
downloadgdb-c5211a5487be06a0bc2172036a8a426b00c0d427.zip
gdb-c5211a5487be06a0bc2172036a8a426b00c0d427.tar.gz
gdb-c5211a5487be06a0bc2172036a8a426b00c0d427.tar.bz2
* elfxx-mips.c (mips_mach_extends_p): Treat MIPS64 as an extension
of MIPS32 and MIPS64r2 as an extension of MIPS32r2.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 316114e..53b5c9e 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -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;
}