binutils-gdb/ld/testsuite/ld-mips-elf/unaligned-jalx-mips16-0.d
Maciej W. Rozycki 67e789ae32 MIPS/LD/testsuite: Fix unaligned JALX failures with OpenBSD targets
There are only n64 linker emulations included with `mips64*-*-openbsd*'
targets, however the unaligned JALX tests insist on running across all
targets and force the n32 ABI, causing link errors with the targets
concerned, e.g.:

./ld-new: tmpdir/unaligned-jalx-0.o: ABI is incompatible with that of the selected emulation
./ld-new: failed to merge target specific data of file tmpdir/unaligned-jalx-0.o
./ld-new: tmpdir/unaligned-insn.o: ABI is incompatible with that of the selected emulation
./ld-new: failed to merge target specific data of file tmpdir/unaligned-insn.o

Convert the tests then to use the per-ABI framework and run them for the
o32 and n32 ABIs, removing these regressions:

mips64-openbsd  -FAIL: MIPS JALX to unaligned symbol 0
mips64-openbsd  -FAIL: MIPS JALX to unaligned symbol 1
mips64-openbsd  -FAIL: MIPS JALX to unaligned symbol 2
mips64-openbsd  -FAIL: MIPS JALX to unaligned symbol 3
mips64-openbsd  -FAIL: MIPS16 JALX to unaligned symbol 0
mips64-openbsd  -FAIL: MIPS16 JALX to unaligned symbol 1
mips64-openbsd  -FAIL: microMIPS JALX to unaligned symbol 0
mips64-openbsd  -FAIL: microMIPS JALX to unaligned symbol 1
mips64el-openbsd  -FAIL: MIPS JALX to unaligned symbol 0
mips64el-openbsd  -FAIL: MIPS JALX to unaligned symbol 1
mips64el-openbsd  -FAIL: MIPS JALX to unaligned symbol 2
mips64el-openbsd  -FAIL: MIPS JALX to unaligned symbol 3
mips64el-openbsd  -FAIL: MIPS16 JALX to unaligned symbol 0
mips64el-openbsd  -FAIL: MIPS16 JALX to unaligned symbol 1
mips64el-openbsd  -FAIL: microMIPS JALX to unaligned symbol 0
mips64el-openbsd  -FAIL: microMIPS JALX to unaligned symbol 1

Similar tests for the n64 ABI can be added separately, using suitable
dump patterns.

	ld/
	* testsuite/ld-mips-elf/unaligned-jalx-0.d: Remove `-32' from
	the `as' tag.
	* testsuite/ld-mips-elf/unaligned-jalx-1.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-2.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-3.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-mips16-0.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-mips16-1.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-micromips-0.d: Likewise.
	* testsuite/ld-mips-elf/unaligned-jalx-micromips-1.d: Likewise.
	* testsuite/ld-mips-elf/mips-elf.exp: Run unaligned JALX tests
	with `run_dump_test_o32' and `run_dump_test_n32' rather than
	`run_dump_test'.
2023-07-28 06:00:36 +01:00

24 lines
499 B
Makefile

#name: MIPS16 JALX to unaligned symbol 0
#source: unaligned-jalx-0.s -mips16
#source: unaligned-insn.s
#as: -EB
#ld: -EB -Ttext 0x1c000000 -e 0x1c000000
#objdump: -dr --prefix-addresses --show-raw-insn
.*: +file format .*mips.*
Disassembly of section \.text:
[0-9a-f]+ <[^>]*> 1c18 0008 jalx 1c000020 <bar0>
[0-9a-f]+ <[^>]*> 6500 nop
[0-9a-f]+ <[^>]*> 1c18 0009 jalx 1c000024 <bar2>
[0-9a-f]+ <[^>]*> 6500 nop
\.\.\.
\.\.\.
\.\.\.
\.\.\.
\.\.\.
\.\.\.
\.\.\.
\.\.\.
\.\.\.