mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-26 05:16:24 -05:00
armstate: Correct FIQ register banking
FIQ has seven banked registers (R8 to R14), not two.
This commit is contained in:
parent
b83e95727f
commit
d53c9cde1a
1 changed files with 3 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
|||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <algorithm>
|
||||
#include "common/swap.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/memory.h"
|
||||
|
@ -48,8 +49,7 @@ void ARMul_State::ChangePrivilegeMode(u32 new_mode)
|
|||
Spsr[UNDEFBANK] = Spsr_copy;
|
||||
break;
|
||||
case FIQ32MODE:
|
||||
Reg_firq[0] = Reg[13];
|
||||
Reg_firq[1] = Reg[14];
|
||||
std::copy(Reg.begin() + 8, Reg.end() - 1, Reg_firq.begin());
|
||||
Spsr[FIQBANK] = Spsr_copy;
|
||||
break;
|
||||
}
|
||||
|
@ -85,8 +85,7 @@ void ARMul_State::ChangePrivilegeMode(u32 new_mode)
|
|||
Bank = UNDEFBANK;
|
||||
break;
|
||||
case FIQ32MODE:
|
||||
Reg[13] = Reg_firq[0];
|
||||
Reg[14] = Reg_firq[1];
|
||||
std::copy(Reg_firq.begin(), Reg_firq.end(), Reg.begin() + 8);
|
||||
Spsr_copy = Spsr[FIQBANK];
|
||||
Bank = FIQBANK;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue