Liveness analysis: declare don't-care registers and flags at port exits #38

Closed
opened 2026-11-02 17:38:43 +00:00 by Gatchan · 0 comments
Owner

Bridges currently recompute every register/flag the original leaves at exit, path by path (field batch 1: ~0.6 line of bridge per line of game code). Brief §7.1 item 4: values the original leaves dead may be declared don't-care, each declaration checked by a liveness analysis of the routine's callers (see lessons.md §1, liveness details: PHP/PLP pairing, A low/high bytes, M bit).

Scope: a tool that computes, per routine, which of A(lo/hi)/X/Y/P flags/D/DB are live after return over all call sites; the shadow comparison skips declared dead values and the fuzzer poisons them. Goal: cut bridge cost and make batches of 15-30 routines practical.

From the 2026-11-02 plan review.

Bridges currently recompute every register/flag the original leaves at exit, path by path (field batch 1: ~0.6 line of bridge per line of game code). Brief §7.1 item 4: values the original leaves dead may be declared don't-care, each declaration checked by a liveness analysis of the routine's callers (see lessons.md §1, liveness details: PHP/PLP pairing, A low/high bytes, M bit). Scope: a tool that computes, per routine, which of A(lo/hi)/X/Y/P flags/D/DB are live after return over all call sites; the shadow comparison skips declared dead values and the fuzzer poisons them. Goal: cut bridge cost and make batches of 15-30 routines practical. From the 2026-11-02 plan review.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Gatchan/FF6Portage#38
No description provided.