From 716c08de28589a5560b3337f1b935ed84a49b5e5 Mon Sep 17 00:00:00 2001 From: Chenghua Xu Date: Wed, 29 Aug 2018 17:39:33 +0800 Subject: [MIPS/GAS] Split Loongson CAM Instructions from loongson3a bfd/ * elfxx-mips.c (print_mips_ases): Add CAM extension. binutils/ * readelf.c (print_mips_ases): Add CAM extension. gas/ * NEWS: Mention Loongson Content Address Memory (CAM) support. * config/tc-mips.c (options): Add OPTION_LOONGSON_CAM and OPTION_NO_LOONGSON_CAM. (md_longopts): Likewise. (mips_ases): Define availability for CAM. (mips_convert_ase_flags): Map ASE_LOONGSON_CAM to AFL_ASE_LOONGSON_CAM. (mips_cpu_info_table): Add ASE_LOONGSON_CAM for loongson3a. (md_show_usage): Add help for -mloongson-cam and -mno-loongson-cam. * doc/as.texi: Document -mloongson-cam, -mno-loongson-cam. * doc/c-mips.texi: Document -mloongson-cam, -mno-loongson-cam, .set loongson-cam and .set noloongson-cam. * testsuite/gas/mips/loongson-3a-2.d: Move cam test to ... * testsuite/gas/mips/loongson-cam.d: Here. Add ISA/ASE flag verification. * testsuite/gas/mips/loongson-3a-2.s: Move cam test to ... * testsuite/gas/mips/loongson-cam.s: Here. * testsuite/gas/mips/loongson-3a-mmi.d: Add ASE flag. * testsuite/gas/mips/mips.exp: Run loongson-cam test. include/ * elf/mips.h (AFL_ASE_LOONGSON_CAM): New macro. (AFL_ASE_MASK): Update to include AFL_ASE_LOONGSON_CAM. * opcode/mips.h (ASE_LOONGSON_CAM): New macro. opcodes/ * mips-dis.c (mips_arch_choices): Add CAM to loongson3a descriptors. (parse_mips_ase_option): Handle -M loongson-cam option. (print_mips_disassembler_options): Document -M loongson-cam. * mips-opc.c (LCAM): New macro. (mips_opcodes): Replace IL2F|IL3A marking with LCAM for CAM instructions. --- binutils/ChangeLog | 4 ++++ binutils/readelf.c | 2 ++ 2 files changed, 6 insertions(+) (limited to 'binutils') diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 0f63148..1bd5cf6 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2018-08-29 Chenghua Xu + + * readelf.c (print_mips_ases): Add CAM extension. + 2018-08-27 H.J. Lu * readelf.c (decode_x86_isa): Print if bitmask only diff --git a/binutils/readelf.c b/binutils/readelf.c index d2ee7a3..039717a 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -15651,6 +15651,8 @@ print_mips_ases (unsigned int mask) fputs ("\n\tGINV ASE", stdout); if (mask & AFL_ASE_LOONGSON_MMI) fputs ("\n\tLoongson MMI ASE", stdout); + if (mask & AFL_ASE_LOONGSON_CAM) + fputs ("\n\tLoongson CAM ASE", stdout); if (mask == 0) fprintf (stdout, "\n\t%s", _("None")); else if ((mask & ~AFL_ASE_MASK) != 0) -- cgit v1.1