mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-31 03:45:38 +00:00
CPU/Recompiler: Fix OOB in register pairing
This commit is contained in:
parent
6a4a4c62d7
commit
0fca011bd4
|
@ -379,7 +379,7 @@ void RegisterCache::ReserveCalleeSavedRegisters()
|
||||||
|
|
||||||
// can we find a paired register? (mainly for ARM)
|
// can we find a paired register? (mainly for ARM)
|
||||||
u32 reg_pair;
|
u32 reg_pair;
|
||||||
for (reg_pair = reg + 1; reg < HostReg_Count; reg_pair++)
|
for (reg_pair = reg + 1; reg_pair < HostReg_Count; reg_pair++)
|
||||||
{
|
{
|
||||||
if ((m_state.host_reg_state[reg_pair] & (HostRegState::CalleeSaved | HostRegState::CalleeSavedAllocated)) ==
|
if ((m_state.host_reg_state[reg_pair] & (HostRegState::CalleeSaved | HostRegState::CalleeSavedAllocated)) ==
|
||||||
HostRegState::CalleeSaved)
|
HostRegState::CalleeSaved)
|
||||||
|
|
Loading…
Reference in a new issue