Skip to content

feat: add Amiga custom register bitfield auto-comments and call-graph cycle propagation - #5

Merged
mikolas merged 1 commit into
masterfrom
feat/hw-comments-and-cg-cycles
Oct 26, 2026
Merged

mikolas merged 1 commit into
masterfrom
feat/hw-comments-and-cg-cycles

Conversation

@mikolas

@mikolas mikolas commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Hardware Register Bitfield Auto-Comments (internal/amiga/bitfields.go, internal/analyzer/format.go, internal/analyzer/baseregs.go):
    • Automatically decodes immediate .w and paired .l writes to key Amiga custom registers (DMACON, INTENA, INTREQ, ADKCON, BPLCON0, BLTCON0, BLTCON1, BLTSIZE) into human-readable bitfield auto-comments stored in comments.auto_comment so they appear in the TUI and survive hunks emit into .asm files.
  • Call-Graph Cycle Propagation & Inclusive Subroutine Timing (internal/callgraph/callgraph.go, internal/tui/):
    • Computes Self (min-max cyc) and Inclusive (+callees) cycle bounds (plus +loop and +ind markers) across the static call graph (hunks cg).
    • Surfaces [incl: X-Y cyc] in the TUI v/V selection status bar, [→X-Y cyc] callee timing hints when the cursor is on a jsr/bsr instruction, and self/inclusive cycle summaries in the Functions (f) modal.
    • Fixes l.kind -> l.type column name in FunctionLabelAddrs().

Test Plan

  • go build ./... && go vet ./... && go test -v ./...
  • Added unit tests in internal/amiga/bitfields_test.go, internal/analyzer/analyzer_test.go, internal/callgraph/callgraph_test.go, and internal/tui/tui_test.go.

… cycle propagation

- Decode immediate .w and paired .l writes to DMACON, INTENA, INTREQ, ADKCON, BPLCON0, BLTCON0, BLTCON1, and BLTSIZE into persistent auto-comments that survive emit
- Propagate self and inclusive (+callees) MC68000 cycle bounds (+loop, +ind) across the static call graph (hunks cg)
- Surface inclusive subroutine cycle bounds in TUI v/V selection status bar, jsr/bsr callee timing hints, and the Functions (f) modal
- Fix labels.type column name in FunctionLabelAddrs()
@mikolas
mikolas merged commit 8779a64 into master Oct 26, 2026
8 checks passed
@mikolas
mikolas deleted the feat/hw-comments-and-cg-cycles branch October 26, 2026 21:39
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