binutils-gdb/binutils/testsuite/binutils-all/mips
Maciej W. Rozycki d17e797f5c MIPS/opcodes: Fix alias annotation for branch instructions
Correct issues with INSN2_ALIAS annotation for branch instructions:

- regular MIPS BEQZ/L and BNEZ/L assembly instructions are idioms for
  BEQ/L and BNE/L respectively with the `rs' operand equal to $0,

- microMIPS 32-bit BEQZ and BNEZ assembly instructions are idioms for
  BEQ and BNE respectively with the `rt' operand equal to $0,

- regular MIPS BAL assembly instruction is an idiom for architecture
  levels of up to the MIPSr5 ISA and a machine instruction on its own
  from the MIPSr6 ISA up.

Add missing annotation to BEQZ/L and BNEZ/L accordingly then and add a
new entry for BAL for the MIPSr6 ISA, correcting a disassembly bug:

$ mips-linux-gnu-objdump -m mips:isa64r6 -M no-aliases -d bal.o

bal.o:     file format elf32-tradlittlemips

Disassembly of section .text:

00000000 <foo>:
   0:	04110000 	0x4110000
	...
$

Add test cases accordingly.

Parts for regular MIPS BEQZ/L and BNEZ/L instructions from Sagar Patel.

2022-03-06  Maciej W. Rozycki  <macro@orcam.me.uk>

	binutils/
	* testsuite/binutils-all/mips/mips1-branch-alias.d: New test.
	* testsuite/binutils-all/mips/mips1-branch-noalias.d: New test.
	* testsuite/binutils-all/mips/mips2-branch-alias.d: New test.
	* testsuite/binutils-all/mips/mips2-branch-noalias.d: New test.
	* testsuite/binutils-all/mips/mips32r6-branch-alias.d: New test.
	* testsuite/binutils-all/mips/mips32r6-branch-noalias.d: New
	test.
	* testsuite/binutils-all/mips/micromips-branch-alias.d: New
	test.
	* testsuite/binutils-all/mips/micromips-branch-noalias.d: New
	test.
	* testsuite/binutils-all/mips/mips-branch-alias.s: New test
	source.
	* testsuite/binutils-all/mips/micromips-branch-alias.s: New test
	source.
	* testsuite/binutils-all/mips/mips.exp: Run the new tests.

2022-03-06  Sagar Patel  <sagarmp@cs.unc.edu>
	    Maciej W. Rozycki  <macro@orcam.me.uk>

	opcodes/
	* mips-opc.c (mips_builtin_opcodes): Fix INSN2_ALIAS annotation
	for "bal", "beqz", "beqzl", "bnez" and "bnezl" instructions.
	* micromips-opc.c (micromips_opcodes): Likewise for "beqz" and
	"bnez" instructions.
2022-03-06 18:30:58 +00:00
..
global-local-symtab-final-n32.d MIPS: Make the IRIX naming of local section symbols consistent 2020-07-29 20:56:41 +01:00
global-local-symtab-final-n64.d MIPS: Make the IRIX naming of local section symbols consistent 2020-07-29 20:56:41 +01:00
global-local-symtab-final-o32.d MIPS: Make the IRIX naming of local section symbols consistent 2020-07-29 20:56:41 +01:00
global-local-symtab-n32.d
global-local-symtab-n32t.d
global-local-symtab-n64.d
global-local-symtab-o32.d
global-local-symtab-o32t.d
global-local-symtab-sort-n32.d MIPS: Make the IRIX naming of local section symbols consistent 2020-07-29 20:56:41 +01:00
global-local-symtab-sort-n32t.d MIPS: Make the IRIX naming of local section symbols consistent 2020-07-29 20:56:41 +01:00
global-local-symtab-sort-n64.d MIPS: Make the IRIX naming of local section symbols consistent 2020-07-29 20:56:41 +01:00
global-local-symtab-sort-n64t.d Adjust readelf's output so that section symbols without a name as shown with their section name. 2021-04-21 10:34:32 +01:00
global-local-symtab-sort-o32.d MIPS: Make the IRIX naming of local section symbols consistent 2020-07-29 20:56:41 +01:00
global-local-symtab-sort-o32t.d Adjust readelf's output so that section symbols without a name as shown with their section name. 2021-04-21 10:34:32 +01:00
micromips-branch-alias.d MIPS/opcodes: Fix alias annotation for branch instructions 2022-03-06 18:30:58 +00:00
micromips-branch-alias.s MIPS/opcodes: Fix alias annotation for branch instructions 2022-03-06 18:30:58 +00:00
micromips-branch-noalias.d MIPS/opcodes: Fix alias annotation for branch instructions 2022-03-06 18:30:58 +00:00
mips1-branch-alias.d MIPS/opcodes: Fix alias annotation for branch instructions 2022-03-06 18:30:58 +00:00
mips1-branch-noalias.d MIPS/opcodes: Fix alias annotation for branch instructions 2022-03-06 18:30:58 +00:00
mips2-branch-alias.d MIPS/opcodes: Fix alias annotation for branch instructions 2022-03-06 18:30:58 +00:00
mips2-branch-noalias.d MIPS/opcodes: Fix alias annotation for branch instructions 2022-03-06 18:30:58 +00:00
mips16-alias.d
mips16-alias.s
mips16-extend-insn.d
mips16-extend-insn.s
mips16-extend-noinsn.d
mips16-extend-noinsn.s
mips16-noalias.d
mips16-pcrel.d
mips16-pcrel.s
mips16-undecoded.d
mips16-undecoded.s
mips16e2-extend-insn.d
mips16e2-undecoded.d
mips32r6-branch-alias.d MIPS/opcodes: Fix alias annotation for branch instructions 2022-03-06 18:30:58 +00:00
mips32r6-branch-noalias.d MIPS/opcodes: Fix alias annotation for branch instructions 2022-03-06 18:30:58 +00:00
mips-ase-1.d
mips-ase-1.s
mips-ase-2.d
mips-ase-2.s
mips-ase-3.d
mips-branch-alias.s MIPS/opcodes: Fix alias annotation for branch instructions 2022-03-06 18:30:58 +00:00
mips-note-2-n32.d
mips-note-2-n64.d
mips-note-2.d
mips-note-2r-n32.d
mips-note-2r-n64.d
mips-note-2r.d
mips-reginfo-n32.d
mips-reginfo.d
mips-reginfo.s
mips-xpa-virt-1.d MIPS/opcodes: Do not use CP0 register names for control registers 2021-05-29 03:26:32 +02:00
mips-xpa-virt-2.d MIPS/binutils/testsuite: Fix XPA and Virtualization ASE cases 2021-05-29 03:26:32 +02:00
mips-xpa-virt-3.d MIPS/opcodes: Do not use CP0 register names for control registers 2021-05-29 03:26:32 +02:00
mips-xpa-virt-4.d MIPS/binutils/testsuite: Fix XPA and Virtualization ASE cases 2021-05-29 03:26:32 +02:00
mips-xpa-virt.s
mips.exp MIPS/opcodes: Fix alias annotation for branch instructions 2022-03-06 18:30:58 +00:00
mixed-micromips.d
mixed-micromips.s
mixed-mips16-micromips.d
mixed-mips16-micromips.s
mixed-mips16.d
mixed-mips16.s