binutils Newspaper
OCTOBER 6, 2026
h8 — Proposed — Sentiment 10 / 10

H8/300: gas: testsuite: Use the same architecture for gas and objdump in the FFxx1 test case.

Fixes H8/300 test case by ensuring objdump uses the correct architecture.

This patch corrects a failing test case for the H8/300 architecture in the gas assembler’s test suite. The FFxx1 test fails because gas assembles code for H8/300, but objdump defaults to disassembling it as H8/300H code, leading to mismatched output. The fix involves explicitly telling objdump to use the H8/300 architecture, ensuring consistent interpretation and passing the test.

In the Thread 2 participants
  1. Jan Dubiec proposer

    Submits a patch to ensure objdump uses the H8/300 architecture in a test case, resolving assembly/disassembly mismatches.

    “This patch fixes the issue by telling objdump which architecture to use.”
  2. Jan Beulich reviewer

    Acknowledges the patch and the problem description.

Technical Tradeoffs

  • Ensures test suite accuracy by correctly specifying the target architecture for disassembly.
  • Minor change that improves reliability of testing for specific architectures.

In Details

This patch addresses a specific test case failure in the gas assembler's test suite for the H8/300 architecture. The issue arises from a discrepancy between how gas and objdump interpret the target architecture. gas correctly assembles H8/300 instructions (e.g., using 16-bit registers like r1), but objdump defaults to a more recent variant (H8/300H) which uses 32-bit registers (e.g., er1). This patch forces objdump to use the correct H8/300 architecture flag in the test, aligning its disassembly with gas's assembly and resolving the test failure.

For Context
gas
The GNU Assembler, a component of the binutils package responsible for converting assembly language code into machine code.
H8/300
A family of microcontrollers manufactured by Renesas (formerly Hitachi).
objdump
A utility in the binutils package used to display information from object files, including disassembly of machine code.
test case
A specific set of conditions and steps designed to test a particular feature or bug fix in software.
architecture
The fundamental design and organization of a computer system's hardware, including its instruction set and register set.
Filed Under: H8/300gasobjdumptestsuitearchitecture