[binutils-gdb] H8/300: gas/testsuite: Use same architecture for gas and objdump in the FFxx1 testcase
Jan Beulich
jbeulich@sourceware.org
Fri Sep 11 11:48:18 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=58d78ef38992d7ed639cb545244daeedd5330c4a
commit 58d78ef38992d7ed639cb545244daeedd5330c4a
Author: Jan Dubiec <jdx@o2.pl>
Date: Fri Sep 11 13:43:23 2026 +0200
H8/300: gas/testsuite: Use same architecture for gas and objdump in the FFxx1 testcase
One of the H8/300-specific gas test cases fails as follows:
[...]
../as-new -o tmpdir/ffxx1-elf.o .../gas/testsuite/gas/h8300/ffxx1-elf.s
Executing on host: sh -c {../as-new -o tmpdir/ffxx1-elf.o .../gas/testsuite/gas/h8300/ffxx1-elf.s 2>&1} /dev/null dump.tmp (timeout = 300)
spawn [open ...]
.../gas/testsuite/../../binutils/objdump --prefix-addresses -dr tmpdir/ffxx1-elf.o > tmpdir/dump.out
Executing on host: sh -c {.../gas/testsuite/../../binutils/objdump --prefix-addresses -dr tmpdir/ffxx1-elf.o > tmpdir/dump.out 2>dump.tmp} /dev/null (timeout = 300)
spawn [open ...]
regexp_diff match failure
regexp "^0+0412 <deloop>.*adds #1,r1$"
line "00000412 <deloop> adds #1,er1"
FAIL: FFxx1
[...]
The source code uses "adds #1, r1", which is specific to H8/300, as it
takes a 16-bit register as the operand. H8/300H and later variants, on the
other hand, use 32-bit registers for this instruction, e.g. "adds #1, er1".
Gas correctly assembles the H8/300 code, but objdump disassembles the
resulting binary as H8/300H code because H8/300H is objdump's default
architecture. This causes the error shown above. This patch fixes the issue
by telling objdump which architecture to use.
Signed-off-by: Jan Dubiec <jdx@o2.pl>
Diff:
---
gas/testsuite/gas/h8300/ffxx1-elf.d | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gas/testsuite/gas/h8300/ffxx1-elf.d b/gas/testsuite/gas/h8300/ffxx1-elf.d
index 89e7224dcfe..511c4df2e91 100644
--- a/gas/testsuite/gas/h8300/ffxx1-elf.d
+++ b/gas/testsuite/gas/h8300/ffxx1-elf.d
@@ -1,4 +1,4 @@
-#objdump: --prefix-addresses -dr
+#objdump: --prefix-addresses -dr -m h8300
#name: FFxx1
# Test for FFxx:8 addressing.
More information about the Binutils-cvs
mailing list