diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 15 | ||||
-rw-r--r-- | bfd/archures.c | 2 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 2 | ||||
-rw-r--r-- | bfd/cpu-mips.c | 6 | ||||
-rw-r--r-- | bfd/elfxx-mips.c | 16 |
5 files changed, 40 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index df02dfb..87fc635 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,18 @@ +2007-11-29 Mark Shinwell <shinwell@codesourcery.com> + + * archures.c (bfd_mach_mips_loongson_2e): New. + (bfd_mach_mips_loongson_2f): New. + * bfd-in2.h (bfd_mach_mips_loongson_2e): New. + (bfd_mach_mips_loongson_2f): New. + * cpu-mips.c: Add I_loongson_2e and I_loongson_2f to + anonymous enum. + (arch_info_struct): Add Loongson-2E and Loongson-2F entries. + * elfxx-mips.c (_bfd_elf_mips_mach): Handle Loongson-2E + and Loongson-2F flags. + (mips_set_isa_flags): Likewise. + (mips_mach_extensions): Add Loongson-2E and Loongson-2F + entries. + 2007-11-29 Nick Clifton <nickc@redhat.com> PR ld/5398 diff --git a/bfd/archures.c b/bfd/archures.c index 8f19b7e..3459e55 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -169,6 +169,8 @@ DESCRIPTION .#define bfd_mach_mips12000 12000 .#define bfd_mach_mips16 16 .#define bfd_mach_mips5 5 +.#define bfd_mach_mips_loongson_2e 3001 +.#define bfd_mach_mips_loongson_2f 3002 .#define bfd_mach_mips_sb1 12310201 {* octal 'SB', 01 *} .#define bfd_mach_mipsisa32 32 .#define bfd_mach_mipsisa32r2 33 diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 842a536..5de4c90 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1843,6 +1843,8 @@ enum bfd_architecture #define bfd_mach_mips12000 12000 #define bfd_mach_mips16 16 #define bfd_mach_mips5 5 +#define bfd_mach_mips_loongson_2e 3001 +#define bfd_mach_mips_loongson_2f 3002 #define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */ #define bfd_mach_mipsisa32 32 #define bfd_mach_mipsisa32r2 33 diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c index dbd620a..6384162 100644 --- a/bfd/cpu-mips.c +++ b/bfd/cpu-mips.c @@ -87,6 +87,8 @@ enum I_mipsisa64, I_mipsisa64r2, I_sb1, + I_loongson_2e, + I_loongson_2f }; #define NN(index) (&arch_info_struct[(index) + 1]) @@ -119,7 +121,9 @@ static const bfd_arch_info_type arch_info_struct[] = N (32, 32, bfd_mach_mipsisa32r2,"mips:isa32r2", FALSE, NN(I_mipsisa32r2)), N (64, 64, bfd_mach_mipsisa64, "mips:isa64", FALSE, NN(I_mipsisa64)), N (64, 64, bfd_mach_mipsisa64r2,"mips:isa64r2", FALSE, NN(I_mipsisa64r2)), - N (64, 64, bfd_mach_mips_sb1, "mips:sb1", FALSE, 0), + N (64, 64, bfd_mach_mips_sb1, "mips:sb1", FALSE, NN(I_sb1)), + N (64, 64, bfd_mach_mips_loongson_2e, "mips:loongson_2e", FALSE, NN(I_loongson_2e)), + N (64, 64, bfd_mach_mips_loongson_2f, "mips:loongson_2f", FALSE, 0) }; /* The default architecture is mips:3000, but with a machine number of diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index f674e13..20d4271 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -5221,6 +5221,12 @@ _bfd_elf_mips_mach (flagword flags) case E_MIPS_MACH_SB1: return bfd_mach_mips_sb1; + case E_MIPS_MACH_LS2E: + return bfd_mach_mips_loongson_2e; + + case E_MIPS_MACH_LS2F: + return bfd_mach_mips_loongson_2f; + default: switch (flags & EF_MIPS_ARCH) { @@ -9462,6 +9468,14 @@ mips_set_isa_flags (bfd *abfd) val = E_MIPS_ARCH_5; break; + case bfd_mach_mips_loongson_2e: + val = E_MIPS_ARCH_3 | E_MIPS_MACH_LS2E; + break; + + case bfd_mach_mips_loongson_2f: + val = E_MIPS_ARCH_3 | E_MIPS_MACH_LS2F; + break; + case bfd_mach_mips_sb1: val = E_MIPS_ARCH_64 | E_MIPS_MACH_SB1; break; @@ -11228,6 +11242,8 @@ static const struct mips_mach_extension mips_mach_extensions[] = { { bfd_mach_mips4111, bfd_mach_mips4100 }, /* MIPS III extensions. */ + { bfd_mach_mips_loongson_2e, bfd_mach_mips4000 }, + { bfd_mach_mips_loongson_2f, bfd_mach_mips4000 }, { bfd_mach_mips8000, bfd_mach_mips4000 }, { bfd_mach_mips4650, bfd_mach_mips4000 }, { bfd_mach_mips4600, bfd_mach_mips4000 }, |