Skip to content

Core content from TuKo1982's 68080 optimisation guide - #10

Merged
WDrijver merged 2 commits into
mainfrom
content-core
Nov 3, 2026
Merged

WDrijver merged 2 commits into
mainfrom
content-core

Conversation

@WDrijver

@WDrijver WDrijver commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

First content PR from TuKo1982's "68080 compilation and optimisation guide" (2026-10-30): the core pillar. Toolchain, os, hardware and guides follow in separate PRs.

All files: owner: TuKo1982, origin: ai-assisted, status: draft. Facts carry their source tag ((G) Gunnar, (M) measured, (official) PRM, (SRC) source code), basis, and the core revision in applies_to.core.

Files (41 new, 3 updated)

core/cpu-68080/ (11 references, measured):

  • core-at-a-glance
  • pipeline-15-stages
  • superscalar-issue
  • branches-and-prediction
  • measured-instruction-costs
  • fpu-performance-model
  • caches-and-memory
  • bank-prefix
  • isa-notes-measured
  • performance-counters
  • core-bugs-by-revision

core/best-practices/ (11):

  • interleave-dependency-chains
  • close-loops-with-dbra
  • predicated-bcc-over-one-instruction
  • use-fusable-pairs
  • fpu-schedule-by-completion-slot
  • fpu-when-it-pays
  • align-copy-destination
  • code-size-and-placement
  • ammx-where-it-wins
  • memory-access-patterns
  • fixed-point-and-bitstreams

core/pitfalls/ (20):

  • alu-to-ea-bubble
  • alternating-branch-mispredicted
  • return-address-patching
  • fused-copy-overlap
  • multiply-and-bfffo-block-both-pipes
  • fpu-47-bit-context-save
  • fpu-float-to-integer-conversion
  • fpu-precision-and-rounding
  • fpu-broken-instructions
  • fpu-exceptions-never-trap
  • self-modifying-code-and-caches
  • touch-misuse
  • ammx-pc-relative-source
  • ammx-upper-32-bits
  • tex-does-not-match-prm
  • bank-prefix-pitfalls
  • pc-relative-destination
  • maggie-depth-test-colour-write
  • maggie-span-tail
  • maggie-span-usage

Chip folders:

  • core/saga-3d-maggie/registers.md
  • core/saga-audio-arne/registers.md (partial)

Updated: the indexes of cpu-68080, saga-3d-maggie and saga-audio-arne.

Where these files differ from the PRM

The new conflict rule makes measured facts win. The differences:

  • pipes: 3 in the PRM, 2 enabled;
  • ALU-to-EA bubble: 2 cycles in the PRM, about 4 measured;
  • MUL: 2–3 cycles in the PRM, about 3.1 measured, and it blocks both pipes;
  • TOUCH: the PRM's touch (An) is move16;
  • TEX: the core doesn't match the PRM;
  • event counters: read 0 on release cores.

These are useful for Tommo's next PRM edition.

For TuKo1982 to check

  • Workarounds I derived myself, marked "not tested" in the files:

    • the flush span for the Maggie span tail;
    • painter's algorithm for the depth-test bug.

    They follow from the measured behaviour but aren't in the guide. Please confirm or replace.

  • I wrote new code examples for Wrong/Right sections where the guide has none. They are not assembled in CI: they are fragments without kb:compile.

  • applies_to.core ranges I chose from the guide's wording: mostly Core 12841; FPU context save and conversion Core 12830-12841; bug list Core 12001-12847.

  • Not in this PR:

    • section 8.2–8.5 and 10 (guides, board headers);
    • section 9 (toolchain);
    • section 13's AmigaOS notes (os);
    • section 15.1–15.6 and 15.8 (maggie.library usage, os/libraries).

Knowledge base files relied on

  • CONTRIBUTING.md sections 2, 4 and 6
  • templates/files/reference.md, best-practice.md, pitfall.md
  • core/cpu-68080/prm/ (for cross-references)

🤖 Generated with Claude Code

Split sections 0-7, 13 (ARNE) and 15.7 (Maggie registers) of the
"68080 compilation and optimisation guide" into core/: measured
references in cpu-68080/, best practices, pitfalls, and register files
for Maggie and ARNE. Owner TuKo1982, ai-assisted, draft, with source
tags (G)/(M)/(official)/(SRC) and core revisions.

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