diff options
author | Chenghua Xu <paul.hua.gm@gmail.com> | 2018-08-29 19:57:39 +0800 |
---|---|---|
committer | Chenghua Xu <paul.hua.gm@gmail.com> | 2018-08-29 19:57:39 +0800 |
commit | bdc6c06e3b08ec48ec5ee2174dedc846969c36fd (patch) | |
tree | d31a198a967ebede9f80e0cf4d07aae050a05be9 /gas/config/tc-mips.c | |
parent | 716c08de28589a5560b3337f1b935ed84a49b5e5 (diff) | |
download | gdb-bdc6c06e3b08ec48ec5ee2174dedc846969c36fd.zip gdb-bdc6c06e3b08ec48ec5ee2174dedc846969c36fd.tar.gz gdb-bdc6c06e3b08ec48ec5ee2174dedc846969c36fd.tar.bz2 |
[MIPS/GAS] Split Loongson EXT Instructions from loongson3a.
bfd/
* elfxx-mips.c (infer_mips_abiflags): Use ases instead of
isa_ext for infer ABI flags.
(print_mips_ases): Add Loongson EXT extension.
binutils/
* readelf.c (print_mips_ases): Add Loongson EXT extension.
elfcpp/
* mips.h (AFL_ASE_LOONGSON_EXT): New enum.
gas/
* NEWS: Mention Loongson EXTensions (EXT) support.
* config/tc-mips.c (options): Add OPTION_LOONGSON_EXT and
OPTION_NO_LOONGSON_EXT.
(md_longopts): Likewise.
(mips_ases): Define availability for EXT.
(mips_convert_ase_flags): Map ASE_LOONGSON_EXT to
AFL_ASE_LOONGSON_EXT.
(mips_cpu_info_table): Add ASE_LOONGSON_EXT for loongson3a.
(md_show_usage): Add help for -mloongson-ext and
-mno-loongson-ext.
* doc/as.texi: Document -mloongson-ext, -mno-loongson-ext.
* doc/c-mips.texi: Document -mloongson-ext, -mno-loongson-ext,
.set loongson-ext and .set noloongson-ext.
* testsuite/gas/mips/loongson-mmi.d: Add ASE flag.
include/
* elf/mips.h (AFL_ASE_LOONGSON_EXT): New macro.
(AFL_ASE_MASK): Update to include AFL_ASE_LOONGSON_EXT.
* opcode/mips.h (ASE_LOONGSON_EXT): New macro.
opcodes/
* mips-dis.c (mips_arch_choices): Add EXT to loongson3a
descriptors.
(parse_mips_ase_option): Handle -M loongson-ext option.
(print_mips_disassembler_options): Document -M loongson-ext.
* mips-opc.c (IL3A): Delete.
* mips-opc.c (LEXT): New macro.
(mips_opcodes): Replace IL2F|IL3A marking with LEXT for EXT
instructions.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 1f58a6d..51eee00 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -1533,6 +1533,8 @@ enum options OPTION_NO_LOONGSON_MMI, OPTION_LOONGSON_CAM, OPTION_NO_LOONGSON_CAM, + OPTION_LOONGSON_EXT, + OPTION_NO_LOONGSON_EXT, OPTION_END_OF_ENUM }; @@ -1597,6 +1599,8 @@ struct option md_longopts[] = {"mno-loongson-mmi", no_argument, NULL, OPTION_NO_LOONGSON_MMI}, {"mloongson-cam", no_argument, NULL, OPTION_LOONGSON_CAM}, {"mno-loongson-cam", no_argument, NULL, OPTION_NO_LOONGSON_CAM}, + {"mloongson-ext", no_argument, NULL, OPTION_LOONGSON_EXT}, + {"mno-loongson-ext", no_argument, NULL, OPTION_NO_LOONGSON_EXT}, /* Old-style architecture options. Don't add more of these. */ {"m4650", no_argument, NULL, OPTION_M4650}, @@ -1804,6 +1808,11 @@ static const struct mips_ase mips_ases[] = { OPTION_LOONGSON_CAM, OPTION_NO_LOONGSON_CAM, 0, 0, -1, -1, -1 }, + + { "loongson-ext", ASE_LOONGSON_EXT, 0, + OPTION_LOONGSON_EXT, OPTION_NO_LOONGSON_EXT, + 0, 0, -1, -1, + -1 }, }; /* The set of ASEs that require -mfp64. */ @@ -19039,6 +19048,8 @@ mips_convert_ase_flags (int ase) ext_ases |= AFL_ASE_LOONGSON_MMI; if (ase & ASE_LOONGSON_CAM) ext_ases |= AFL_ASE_LOONGSON_CAM; + if (ase & ASE_LOONGSON_EXT) + ext_ases |= AFL_ASE_LOONGSON_EXT; return ext_ases; } @@ -19786,8 +19797,8 @@ static const struct mips_cpu_info mips_cpu_info_table[] = /* MIPS 64 Release 2 */ /* Loongson CPU core */ - { "loongson3a", 0, ASE_LOONGSON_MMI | ASE_LOONGSON_CAM, ISA_MIPS64R2, - CPU_LOONGSON_3A }, + { "loongson3a", 0, ASE_LOONGSON_MMI | ASE_LOONGSON_CAM | ASE_LOONGSON_EXT, + ISA_MIPS64R2, CPU_LOONGSON_3A }, /* Cavium Networks Octeon CPU core */ { "octeon", 0, 0, ISA_MIPS64R2, CPU_OCTEON }, @@ -20066,6 +20077,9 @@ MIPS options:\n\ -mloongson-cam generate Loongson Content Address Memory (CAM) instructions\n\ -mno-loongson-cam do not generate Loongson Content Address Memory Instructions\n")); fprintf (stream, _("\ +-mloongson-ext generate Loongson EXTensions (EXT) instructions\n\ +-mno-loongson-ext do not generate Loongson EXTensions Instructions\n")); + fprintf (stream, _("\ -minsn32 only generate 32-bit microMIPS instructions\n\ -mno-insn32 generate all microMIPS instructions\n")); fprintf (stream, _("\ |