Skip to content

Toolchain content from TuKo1982's 68080 optimisation guide - #11

Merged
WDrijver merged 1 commit into
mainfrom
content-toolchain
Nov 3, 2026
Merged

WDrijver merged 1 commit into
mainfrom
content-toolchain

Conversation

@WDrijver

@WDrijver WDrijver commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Second content PR from TuKo1982's "68080 compilation and optimisation guide": section 9 (toolchain). New files: owner: TuKo1982, origin: ai-assisted, status: draft.

New files

toolchain/pitfalls/:

  • vasm-pc-relative-destination: vasm -m68080 rewrites absolute destinations into PC-relative ones, which the 68080 miscomputes after a full-extension source. Option b as agreed: keep the standard options, add the warning and a detection step. The vasm author has been informed.
  • vasm-68080-encoding-issues:
    • BANK single operands, add.l #imm,En, add.l b1,d0 → $71F1;
    • AMMX PC-relative sources;
    • silent .s → .s+;
    • abs/min/max/andn;
    • TEX, load at the top of a file.
  • gcc-bbb-autoinc: ApolloCrossDev PR Pillar-first content structure and document intake #5, still open.
  • gcc-dbra-address-register-loop: ApolloCrossDev PR Document intake: 68080 Programmer's Reference Manual #7, still open.
  • gcc-stackswap-defer-pop
  • float-settings-mismatch:
    • -m68080 alone is soft-float; -m68881 gives hard float;
    • mixed float settings give garbage doubles;
    • soft-float in -nostartfiles libraries.
  • gcc-misc-traps: -mtune=68060, NULL writes, -O3.
  • libnix-and-header-traps
  • calling-assembler-from-gcc

toolchain/best-practices/:

  • gcc-code-generation-for-68080

Updated files

  • vasm-assembler.md:
    • the warning in the summary;
    • ApolloCrossDev ships vasm 2.0f (checked in Compilers/_archives/vasm/vasm.tar.tar, vasm.c);
    • -no-opt, -L, -devpac and machine ac68080.
  • c-compiler-options.md:
    • why -m68881 is required;
    • -O3 gives no gain;
    • don't use -mtune=68060;
    • same flags for compile and link;
    • -lm for sprintf.
  • compiler-variants.md:
    • the table of pending GCC fixes;
    • a note that the README's planned mov3q/clr.q/movs/movz generation would produce LineA instructions that only run on cores 10280–10904.
  • core/pitfalls/pc-relative-destination.md: links to the new toolchain pitfall.

For the maintainers

Knowledge base files relied on

  • toolchain/ (existing files)
  • core/pitfalls/bank-prefix-pitfalls.md, core/pitfalls/pc-relative-destination.md, core/pitfalls/ammx-pc-relative-source.md
  • CONTRIBUTING.md sections 2 and 4

🤖 Generated with Claude Code

Split section 9 of the guide into toolchain/: vasm and GCC pitfalls,
libnix traps, calling assembler from GCC, and a best practice on GCC
code generation for the 68080. Warn about vasm 2.0f's PC-relative
destinations in vasm-assembler.md (option b), explain why -m68881 is
needed for FPU code, list the open GCC fixes (ApolloCrossDev PR #5 and
#7), and note that the planned LineA code generation would not run on
current cores.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@WDrijver
WDrijver requested a review from TuKo1982 as a code owner November 3, 2026 12:07
@WDrijver
WDrijver merged commit 5d39083 into main Nov 3, 2026
2 checks passed
@WDrijver
WDrijver deleted the content-toolchain branch November 3, 2026 12:12
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