Repository navigation
README: moviw.l and bcc.s+ are vasm only, not generated by GCC - #24
Merged
Merged
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The README lists
moviw.landbcc.s+among the 68080 instructions GCC-6.50-Patched generates. GCC doesn't generate them:gcc-stable,68080regs) and the patches inCompilers/_archives/patches/have output patterns forcmpiw.landdbral(m68k.md) andaddiw.l(m68k.c) only. gas's opcode table adds onlyaddiwl,cmpiwlanddbralfor the 68080.-O2,-Osand-O3emitsmove.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 inbcc.s+range, comes out asbeq.w($6700 00F0).moviw.l #$8123,d0→$303D 8123, and an out-of-rangebra.sbecomesbra.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 emittingmoviw.🤖 Generated with Claude Code