[PATCH v5] MIPS/GAS: Split Loongson MMI Instructions from loongson2f/3a

Paul Hua paul.hua.gm@gmail.com
Thu Jul 19 08:17:00 GMT 2018


Hi Maciej:

>  I have looked through your change again and noticed that the ASE_MMI flag
> has been incorrectly placed in the `isa' rather than `ase' field of the
> `mips_arch_choices' structure, and that hasn't been caught by the new
> loongson-2f-mmi.d and loongson-3a-mmi.d tests.  I have moved the flag to
> the correct place and removed `-M mmi' from the test cases so that the
> they correctly verify that the presence of the MMI ASE flag in the ABI
> flags is observed.  I also removed the `-r' disassembly option as useless
> (no relocations are handled by these tests) and added `-p' with suitable
> verification patterns for the presence of ISA and ASE flags.

Thanks for your review and great jobs for do that.

>  I also fixed a typo in GAS documentation s/-mno-gmmi/-mno-mmi/,
> capitalised MMI in the new tests and fixed a couple of places with
> trailing whitespace being introduced.  I suggest that you configure your
> GIT binutils repository to warn about whitespace issues:
>
> $ git config core.whitespace indent-with-non-tab,space-before-tab,trailing-space

Thanks, learned.

>
>  Most importantly however I think this ASE should use the Loongson name
> space to emphasise that this is a vendor rather than an architectural ASE.
> I have updated the names throughout your change accordingly.
>

I think the -mloongson-mmi option are too long to use, we perfer to
use -mlmmi option, The 'l' means Loongson name space. The attached is
v5 patch.

Paul Hua.
-------------- next part --------------
2018-07-19  Chenghua Xu  <paul.hua.gm@gmail.com>
            Maciej W. Rozycki  <macro@mips.com>

bfd/
	* elfxx-mips.c (print_mips_ases): Add LMMI extension.

binutils/
	* readelf.c (print_mips_ases): Add LMMI extension.

gas/
	* NEWS: Mention Loongson MultiMedia extensions Instructions
	(LMMI) support.
	* config/tc-mips.c (options): Add OPTION_LMMI and 
	OPTION_NO_LMMI.
	(md_longopts): Likewise.
	(mips_ases): Define availability for LMMI.
	(mips_convert_ase_flags): Map ASE_LMMI to AFL_ASE_LMMI.
	(mips_cpu_info_table): Add ASE_LMMI for loongson2f/3a.
	(md_show_usage): Add help for -mlmmi and -mno-lmmi.
	* doc/as.texi: Document -mlmmi, -mno-lmmi.
	* doc/c-mips.texi: Document -mlmmi, -mno-lmmi, 
	.set lmmi and .set nolmmi.
	* testsuite/gas/mips/loongson-2f.d: Move lmmi test to ...
	* testsuite/gas/mips/loongson-2f-lmmi.d: Here.  Add ISA/ASE
	flag verification.
	* testsuite/gas/mips/loongson-2f.s: Move lmmi test to ...
	* testsuite/gas/mips/loongson-2f-lmmi.s: Here.
	* testsuite/gas/mips/loongson-3a.d: Move lmmi test to ...
	* testsuite/gas/mips/loongson-3a-lmmi.d: Here.  Add ISA/ASE
	flag verification.
	* testsuite/gas/mips/loongson-3a.s: Move lmmi test to ...
	* testsuite/gas/mips/loongson-3a-lmmi.s: Here.
	* testsuite/gas/mips/mips.exp: Run loongson-2f-lmmi and
	loongson-3a-lmmi tests.

include/
	* elf/mips.h (AFL_ASE_LMMI): New macro.
	(AFL_ASE_MASK): Update to include AFL_ASE_LMMI.
	* opcode/mips.h (ASE_LMMI): New macro.

opcodes/
	* mips-dis.c (mips_arch_choices): Add LMMI to loongson2f and
	loongson3a descriptors.
	(parse_mips_ase_option): Handle -M lmmi option.
	(print_mips_disassembler_options): Document -M lmmi.
	* mips-opc.c (LMMI): New macro.
	(mips_opcodes): Replace IL2F|IL3A marking with LMMI for LMMI
	instructions.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-add-loongson-lmmi-support-v5.patch
Type: text/x-patch
Size: 66118 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20180719/d8b8714c/attachment.bin>


More information about the Binutils mailing list