mirror of
https://github.com/jkdansereau/goldeneye-pc-port.git
synced 2026-10-23 15:52:42 +02:00
stanCheckLinkedSpecialTile was decompiled with an all-s32 middle-arg prototype while its callers pass it through the standTileLocusCallback_B_t typedef (f32 f32 f32). On x86-64 SysV the int/float class split puts the 6th arg (outFlags/record) in %rdx per the typedef but %r9 per the definition, so the FORCECROUCH/LADDER store hit a stale scratch register. MIPS o32 passes both through GPRs a0-a5 identically, which is why the mismatch was invisible on N64 and in the decompilation. ABI-class edit (AGENTS.md #2 narrow exception): body never uses the three middle params; N64 codegen unaffected. Verified under gdb on WSL: pre-fix SIGSEGV at stan.c:2441 with r9=0x3 and a valid record in the caller frame; post-fix the same walk route completes clean.