N64Recomp/include
Matthew Stanley 5c0f771c59 recompilation: extend tolerant emit to print_branch fall-through path
Found a third emit-non-compilable-code path during Pokemon Stadium
runner build: print_branch lambda (line 371) checks for tail-call
candidates when the branch target is outside the function, prints
a warning if not found — then falls through to emit
`goto L_<branch_target>` to a label that doesn't exist in the
generated function. Linker compiles fail with "use of undeclared
label L_XXXXXXXX".

Fixed by emitting the same recomp_unhandled_branch runtime call as
the other tolerant-emit paths, plus an early return so the fall-
through to emit_goto doesn't run.

Also exposes recomp_unhandled_* declarations in include/recomp.h
(after the existing recomp_context definition + recomp_syscall_handler
decl) so generated C compiles cleanly without consumer-side header
patches.

171 → ~600+ tolerant-emit warnings on Pokemon Stadium pass; full
build pipeline now produces a linked PokemonStadiumRecomp.exe
that loads librecomp/ultramodern and runs cleanly to a "link-only
entry" message. Real boot still needs runtime wiring (renderer,
scheduler, init).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 21:16:57 -07:00
..
recompiler Add mod merger tool (#168) 2025-12-31 22:17:44 -05:00
recomp.h recompilation: extend tolerant emit to print_branch fall-through path 2026-05-05 21:16:57 -07:00