Commit Graph

2 Commits

Author SHA1 Message Date
Maciej W. Rozycki
3abf975826 MIPS/binutils/testsuite: Correct mips.exp test ABI/emul/endian arrangement
The binutils testsuite supports involving LD in processing test cases
and with the MIPS target that has the same issues the LD testsuite does.

So to support LD in the MIPS part of the binutils testsuite similarly
to commit 86b24e15c4 ("MIPS/LD/testsuite: Correct comm-data.exp test
ABI/emul/endian arrangement") update the mips.exp test script to:

- correctly select emulations for targets using non-traditional MIPS
  emulations,

- correctly select ABIs for targets that do not support all of them,

- use the default endianness selection where possible to benefit targets
  that support only one,

- simplify test invocation by providing ABI-specific `run_dump_test'
  wrappers, specifically `run_dump_test_o32', `run_dump_test_n32' and
  `run_dump_test_n64', which remove the need to use conditionals across
  the Expect script or to repeat ABI-specific GAS and LD flags with each
  invocation,

borrowing changes from commit 78da84f994 ("MIPS/LD/testsuite: Correct
mips-elf.exp test ABI/emul/endian arrangement").

As a side effect this disables o32 ABI testing for targets that are not
supposed to support them and do not with LD, but still have such support
with BFD and GAS due to our inflexibility in configuration.  Ultimately
we ought to support having o32 completely disabled.

	binutils/
	* testsuite/binutils-all/mips/mips.exp (run_dump_test_abi)
	(run_dump_test_o32, run_dump_test_n32, run_dump_test_n64): New
	procedures.
	(has_newabi): Remove variable.
	(has_abi, abi_asflags, abi_ldflags): New associative array
	variables.
	(irixemul): New variable.
	Replace `run_dump_test' calls where applicable throughout with
	`run_dump_test_o32', `run_dump_test_n32' and `run_dump_test_n64'
	as appropriate.  Use `noarch' for tests that require their own
	architecture setting.
	* testsuite/binutils-all/mips/mips-ase-1.d: Remove GAS flags.
	* testsuite/binutils-all/mips/mips-ase-2.d: Likewise.
	* testsuite/binutils-all/mips/mips-ase-3.d: Likewise.
	* testsuite/binutils-all/mips/mips-note-2-n32.d: Likewise.
	* testsuite/binutils-all/mips/mips-note-2-n64.d: Likewise.
	* testsuite/binutils-all/mips/mips-note-2.d: Likewise.
	* testsuite/binutils-all/mips/mips-note-2r-n32.d: Likewise.
	* testsuite/binutils-all/mips/mips-note-2r-n64.d: Likewise.
	* testsuite/binutils-all/mips/mips-note-2r.d: Likewise.
	* testsuite/binutils-all/mips/mips-reginfo-n32.d: Likewise.
	* testsuite/binutils-all/mips/mips-reginfo.d: Likewise.
	* testsuite/binutils-all/mips/mips16-extend-noinsn.d: Likewise.
	* testsuite/binutils-all/mips/mips16-pcrel.d: Likewise.
	* testsuite/binutils-all/mips/mips16-alias.d: Remove `-32' from
	GAS flags.
	* testsuite/binutils-all/mips/mips16-extend-insn.d: Likewise.
	* testsuite/binutils-all/mips/mips16-noalias.d: Likewise.
	* testsuite/binutils-all/mips/mips16-undecoded.d: Likewise.
	* testsuite/binutils-all/mips/mips16e2-extend-insn.d: Likewise.
	* testsuite/binutils-all/mips/mips16e2-undecoded.d: Likewise.
	* testsuite/binutils-all/mips/mixed-micromips.d: Likewise.
	* testsuite/binutils-all/mips/mixed-mips16.d: Likewise.
2020-07-26 14:43:21 +01:00
Maciej W. Rozycki
6e3d1f0728 MIPS16/opcodes: Annotate instruction aliases
Complement commit 986e18a5a9 ("Add a second 'pinfo' member to
mips_opcode to extend number of available bits"),
<https://sourceware.org/ml/binutils/2005-01/msg00261.html>, and annotate
MIPS16 NOP, LA, DLA and the synthetic forms of LD and LW instructions as
aliases.  These correspond to MOVE, and the PC-relative ADDIU, DADDIU,
LD and LW hardware instructions respectively.

	binutils/
	* testsuite/binutils-all/mips/mips16-alias.d: New test.
	* testsuite/binutils-all/mips/mips16-noalias.d: New test.
	* testsuite/binutils-all/mips/mips16-alias.s: New test source.
	* testsuite/binutils-all/mips/mips.exp: Run the new tests.

	opcodes/
	* mips16-opc.c (AL): New macro.
	(mips16_opcodes): Mark "nop", "la", "dla", and synthetic forms
	of "ld" and "lw" as aliases.
2017-04-25 11:55:34 +01:00