From 2c62985659da21a3fe16062d211a7158f79ad2e9 Mon Sep 17 00:00:00 2001 From: "Naveen H.S" Date: Fri, 31 Oct 2014 13:48:04 -0700 Subject: MIPS: Add Octeon 3 support binutils: 2014-10-31 Andrew Pinski Naveen H.S * readelf.c (print_mips_isa_ext): Print the value of Octeon3. gas: 2014-10-31 Andrew Pinski Naveen H.S * config/tc-mips.c (CPU_IS_OCTEON): Handle CPU_OCTEON3. (mips_cpu_info_table): Octeon3 enables virt ase. * doc/c-mips.texi: Document octeon3 as an acceptable value for -march=. gas/testsuite: 2014-10-31 Andrew Pinski Naveen H.S * gas/mips/mips.exp: Add support for Octeon3 architecture. Also add in support for running Octeon3 tests. * gas/mips/octeon3.d: New test. * gas/mips/octeon3.s: New test source. opcodes: 2014-10-31 Andrew Pinski Naveen H.S * mips-dis.c (mips_arch_choices): Add octeon3. * mips-opc.c (IOCT): Include INSN_OCTEON3. (IOCT2): Likewise. (IOCT3): New define. (IVIRT): New define. (mips_builtin_opcodes): Add dmfgc0, dmtgc0, hypcall, mfgc0, mtgc0, tlbinv, tlbinvf, tlbgr, tlbgwi, tlbginv, tlbginvf, tlbgwr, tlbgp, tlti IVIRT instructions. Extend mtm0, mtm1, mtm2, mtp0, mtp1, mtp2 instructions to take another operand for IOCT3. bfd: 2014-10-31 Andrew Pinski Naveen H.S * archures.c: Add octeon3 for mips target. * bfd-in2.h: Regenerate. * bfd/cpu-mips.c: Define I_mipsocteon3. nfo_struct): Add octeon3 support. * bfd/elfxx-mips.c: (_bfd_elf_mips_mach): Add support for octeon3. (mips_set_isa_flags): Add support for octeon3. (bfd_mips_isa_ext): Add bfd_mach_mips_octeon3. (mips_mach_extensions): Make bfd_mach_mips_octeon3 an extension of bfd_mach_mips_octeon2. (print_mips_isa_ext): Print the value of Octeon3. --- bfd/elfxx-mips.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bfd/elfxx-mips.c') diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 61c363a..f82102a 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -6588,6 +6588,9 @@ _bfd_elf_mips_mach (flagword flags) case E_MIPS_MACH_LS3A: return bfd_mach_mips_loongson_3a; + case E_MIPS_MACH_OCTEON3: + return bfd_mach_mips_octeon3; + case E_MIPS_MACH_OCTEON2: return bfd_mach_mips_octeon2; @@ -11859,6 +11862,10 @@ mips_set_isa_flags (bfd *abfd) val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON; break; + case bfd_mach_mips_octeon3: + val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON3; + break; + case bfd_mach_mips_xlr: val = E_MIPS_ARCH_64 | E_MIPS_MACH_XLR; break; @@ -13905,6 +13912,8 @@ bfd_mips_isa_ext (bfd *abfd) return AFL_EXT_OCTEON; case bfd_mach_mips_octeonp: return AFL_EXT_OCTEONP; + case bfd_mach_mips_octeon3: + return AFL_EXT_OCTEON3; case bfd_mach_mips_octeon2: return AFL_EXT_OCTEON2; case bfd_mach_mips_xlr: @@ -14730,6 +14739,7 @@ struct mips_mach_extension static const struct mips_mach_extension mips_mach_extensions[] = { /* MIPS64r2 extensions. */ + { bfd_mach_mips_octeon3, bfd_mach_mips_octeon2 }, { bfd_mach_mips_octeon2, bfd_mach_mips_octeonp }, { bfd_mach_mips_octeonp, bfd_mach_mips_octeon }, { bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 }, @@ -15522,6 +15532,9 @@ print_mips_isa_ext (FILE *file, unsigned int isa_ext) case AFL_EXT_XLR: fputs ("RMI XLR", file); break; + case AFL_EXT_OCTEON3: + fputs ("Cavium Networks Octeon3", file); + break; case AFL_EXT_OCTEON2: fputs ("Cavium Networks Octeon2", file); break; -- cgit v1.1