aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChenghua Xu <paul.hua.gm@gmail.com>2018-07-20 13:21:33 +0100
committerMaciej W. Rozycki <macro@mips.com>2018-07-20 13:21:33 +0100
commit8095d2f70e1a982c006f306be1a9e1c892758914 (patch)
tree75d94d2162fb314607ec90db8e4088654ce7c6de /include
parentdb841b6fcd8b3bc2e6d6774e81c14dfbb9ac815d (diff)
downloadgdb-8095d2f70e1a982c006f306be1a9e1c892758914.zip
gdb-8095d2f70e1a982c006f306be1a9e1c892758914.tar.gz
gdb-8095d2f70e1a982c006f306be1a9e1c892758914.tar.bz2
MIPS/GAS: Split Loongson MMI Instructions from loongson2f/3a
The MMI instruction set has been implemented in many Loongson processors. There is a lot of software optimized for MMI. This patch splits MMI from loongson2f/3a, and adds GAS and disassembler options for MMI instructions. 2018-07-20 Chenghua Xu <paul.hua.gm@gmail.com> Maciej W. Rozycki <macro@mips.com> bfd/ * elfxx-mips.c (print_mips_ases): Add MMI extension. binutils/ * readelf.c (print_mips_ases): Add MMI extension. gas/ * NEWS: Mention MultiMedia extensions Instructions (MMI) support. * config/tc-mips.c (options): Add OPTION_LOONGSON_MMI and OPTION_NO_LOONGSON_MMI. (md_longopts): Likewise. (mips_ases): Define availability for MMI. (mips_convert_ase_flags): Map ASE_LOONGSON_MMI to AFL_ASE_LOONGSON_MMI. (mips_cpu_info_table): Add ASE_LOONGSON_MMI for loongson2f/3a. (md_show_usage): Add help for -mloongson-mmi and -mno-loongson-mmi. * doc/as.texi: Document -mloongson-mmi, -mno-loongson-mmi. * doc/c-mips.texi: Document -mloongson-mmi, -mno-loongson-mmi, .set loongson-mmi and .set noloongson-mmi. * testsuite/gas/mips/loongson-2f.d: Move mmi test to ... * testsuite/gas/mips/loongson-2f-mmi.d: Here. Add ISA/ASE flag verification. * testsuite/gas/mips/loongson-2f.s: Move mmi test to ... * testsuite/gas/mips/loongson-2f-mmi.s: Here. * testsuite/gas/mips/loongson-3a.d: Move mmi test to ... * testsuite/gas/mips/loongson-3a-mmi.d: Here. Add ISA/ASE flag verification. * testsuite/gas/mips/loongson-3a.s: Move mmi test to ... * testsuite/gas/mips/loongson-3a-mmi.s: Here. * testsuite/gas/mips/mips.exp: Run loongson-2f-mmi and loongson-3a-mmi tests. include/ * elf/mips.h (AFL_ASE_MMI): New macro. (AFL_ASE_MASK): Update to include AFL_ASE_LOONGSON_MMI. * opcode/mips.h (ASE_LOONGSON_MMI): New macro. opcodes/ * mips-dis.c (mips_arch_choices): Add MMI to loongson2f and loongson3a descriptors. (parse_mips_ase_option): Handle -M loongson-mmi option. (print_mips_disassembler_options): Document -M loongson-mmi. * mips-opc.c (LMMI): New macro. (mips_opcodes): Replace IL2F|IL3A marking with LMMI for MMI instructions.
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog7
-rw-r--r--include/elf/mips.h3
-rw-r--r--include/opcode/mips.h2
3 files changed, 11 insertions, 1 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index a3b1af8..64224c6 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,10 @@
+2018-07-20 Chenghua Xu <paul.hua.gm@gmail.com>
+ Maciej W. Rozycki <macro@mips.com>
+
+ * elf/mips.h (AFL_ASE_MMI): New macro.
+ (AFL_ASE_MASK): Update to include AFL_ASE_LOONGSON_MMI.
+ * opcode/mips.h (ASE_LOONGSON_MMI): New macro.
+
2018-07-17 Maciej W. Rozycki <macro@mips.com>
* bfdlink.h (bfd_link_hash_entry): Add `rel_from_abs' member.
diff --git a/include/elf/mips.h b/include/elf/mips.h
index 4e2cde3..2d73212 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -1238,7 +1238,8 @@ extern void bfd_mips_elf_swap_abiflags_v0_out
#define AFL_ASE_CRC 0x00008000 /* CRC ASE. */
#define AFL_ASE_RESERVED1 0x00010000 /* Reserved by MIPS Tech for WIP. */
#define AFL_ASE_GINV 0x00020000 /* GINV ASE. */
-#define AFL_ASE_MASK 0x0002ffff /* All ASEs. */
+#define AFL_ASE_LOONGSON_MMI 0x00040000 /* Loongson MMI ASE. */
+#define AFL_ASE_MASK 0x0004ffff /* All ASEs. */
/* Values for the isa_ext word of an ABI flags structure. */
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
index 1ab1780..05614c1 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
@@ -1302,6 +1302,8 @@ static const unsigned int mips_isa_table[] = {
#define ASE_CRC64 0x00080000
/* Global INValidate Extension. */
#define ASE_GINV 0x00100000
+/* Loongson MultiMedia extensions Instructions (MMI). */
+#define ASE_LOONGSON_MMI 0x00200000
/* MIPS ISA defines, use instead of hardcoding ISA level. */