mirror of
https://github.com/open-goal/jak-project
synced 2026-06-09 12:46:43 -04:00
[decompiler] Workaround for GOAL fpr -> gpr spill bug and fix >16-bit signed FP loads (#587)
* fix up broken stuff for collectables * exception for stack spill float in gpr bug
This commit is contained in:
@@ -13,6 +13,16 @@ void StackSpillMap::add_access(const StackSpillSlot& access) {
|
||||
auto existing = m_slot_map.find(access.offset);
|
||||
if (existing != m_slot_map.end()) {
|
||||
if (access != existing->second) {
|
||||
// the GOAL float -> GPR loads are just totally wrong.
|
||||
if (existing->second.size == 16 && access.size == 4) {
|
||||
existing->second.size = 4;
|
||||
return;
|
||||
}
|
||||
|
||||
if (existing->second.size == 4 && access.size == 16) {
|
||||
return;
|
||||
}
|
||||
|
||||
throw std::runtime_error(fmt::format("Inconsistent stack access:\n{}\n{}\n",
|
||||
existing->second.print(), access.print()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user