Skip to content

README: moviw.l and bcc.s+ are vasm only, not generated by GCC - #24

Merged
WDrijver merged 1 commit into
mainfrom
readme-gcc-opcodes
Nov 8, 2026
Merged

WDrijver merged 1 commit into
mainfrom
readme-gcc-opcodes

Conversation

@WDrijver

@WDrijver WDrijver commented Nov 8, 2026

Copy link
Copy Markdown
Owner

The README lists moviw.l and bcc.s+ among the 68080 instructions GCC-6.50-Patched generates. GCC doesn't generate them:

  • Source: WDrijver/gcc (gcc-stable, 68080regs) and the patches in Compilers/_archives/patches/ have output patterns for cmpiw.l and dbral (m68k.md) and addiw.l (m68k.c) only. gas's opcode table adds only addiwl, cmpiwl and dbral for the 68080.
  • Output: GCC-6.50-Dev at -O2, -Os and -O3 emits move.l #imm ($203C + 4 bytes) for 16-bit constants: returned, stored to memory, stored to a global, stored in a loop. A branch over 240 bytes, which is in bcc.s+ range, comes out as beq.w ($6700 00F0).
  • vasm does assemble both: moviw.l #$8123,d0 → $303D 8123, and an out-of-range bra.s becomes bra.s+ ($6049).

The change splits the line into what GCC generates and what is assembler only.

ApolloKnowledgeBase now checks this in CI (ApolloTeam-dev/ApolloKnowledgeBase#32, toolchain/compiler-variants.md): the check fails as soon as GCC starts emitting moviw.

🤖 Generated with Claude Code

… are vasm only

The GCC source (WDrijver/gcc gcc-stable and 68080regs) and the patches in
Compilers/_archives/patches have output patterns for cmpiw.l, addiw.l and
dbral only. GCC-6.50-Dev emits move.l #imm for 16-bit constants and bcc.w
for branches in bcc.s+ range; vasm assembles moviw.l and bcc.s+.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@WDrijver
WDrijver merged commit 3311406 into main Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant