CPU/Recompiler: Fix incorrect speculative byte/halfword reads

Fixes crash on boot in Monkey Magic.
This commit is contained in:
Connor McLaughlin 2021-01-10 01:38:04 +10:00
parent 4fafb34251
commit df98a0b04e
1 changed files with 2 additions and 2 deletions

View File

@ -1324,9 +1324,9 @@ bool CodeGenerator::Compile_Load(const CodeBlockInstruction& cbi)
if (address_spec)
{
value_spec = SpeculativeReadMemory(*address_spec & ~1u);
value_spec = SpeculativeReadMemory(*address_spec & ~3u);
if (value_spec)
value_spec = (*value_spec >> ((*address_spec & 1u) * 16u)) & 0xFFFFu;
value_spec = (*value_spec >> ((*address_spec & 3u) * 8u)) & 0xFFFFu;
}
}
break;