mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 03:29:47 +08:00
[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.
This commit is contained in:
@ -630,8 +630,9 @@ const struct mips_arch_choice mips_arch_choices[] =
|
||||
NULL, 0, mips_cp1_names_numeric, mips_hwr_names_numeric },
|
||||
|
||||
{ "loongson3a", 1, bfd_mach_mips_loongson_3a, CPU_LOONGSON_3A,
|
||||
ISA_MIPS64R2 | INSN_LOONGSON_3A, ASE_LOONGSON_MMI, mips_cp0_names_numeric,
|
||||
NULL, 0, mips_cp1_names_mips3264, mips_hwr_names_numeric },
|
||||
ISA_MIPS64R2 | INSN_LOONGSON_3A, ASE_LOONGSON_MMI | ASE_LOONGSON_CAM,
|
||||
mips_cp0_names_numeric, NULL, 0, mips_cp1_names_mips3264,
|
||||
mips_hwr_names_numeric },
|
||||
|
||||
{ "octeon", 1, bfd_mach_mips_octeon, CPU_OCTEON,
|
||||
ISA_MIPS64R2 | INSN_OCTEON, 0, mips_cp0_names_numeric, NULL, 0,
|
||||
@ -941,6 +942,12 @@ parse_mips_ase_option (const char *option)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (CONST_STRNEQ (option, "loongson-cam"))
|
||||
{
|
||||
mips_ase |= ASE_LOONGSON_CAM;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -2592,6 +2599,10 @@ static struct
|
||||
N_("Recognize the Loongson MultiMedia extensions "
|
||||
"Instructions (MMI) ASE instructions.\n"),
|
||||
MIPS_OPTION_ARG_NONE },
|
||||
{ "loongson-cam",
|
||||
N_("Recognize the Loongson Content Address Memory (CAM) "
|
||||
" instructions.\n"),
|
||||
MIPS_OPTION_ARG_NONE },
|
||||
{ "gpr-names=", N_("Print GPR names according to specified ABI.\n\
|
||||
Default: based on binary being disassembled.\n"),
|
||||
MIPS_OPTION_ARG_ABI },
|
||||
|
Reference in New Issue
Block a user