[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:
water111
2021-06-13 13:55:55 -04:00
committed by GitHub
parent 43b89dd982
commit 13b5695b63
6 changed files with 230 additions and 138 deletions
+10
View File
@@ -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()));
}