Error handling / detection for memory mapped registers and KSEG1 addresses
Author: gcsmithCreated Jan 1, 2026Updated Jan 1, 2026
Recently bumped into this debugging a crash in Pilotwings 64 due to writing SP_STATUS_REG.
Chatted w/ WiseGuy and learned that this isn't supported by design. Ideally the tool could identify these cases (immediate addresses at minimum, preferably register-indirect as well with some static analysis) and produce an error or automatically NOP out the instruction.
It might also be useful to have an opt-in / debug-only feature to add bounds checks to these macros, similar to GLIBCXX_DEBUG.
Source: N64Recomp/N64Recomp