mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-08-22 07:53:21 +02:00
arm: fix context save of vector regs
This commit is contained in:
parent
45c87c7e6e
commit
f0ee3e29cb
@ -400,9 +400,8 @@ void ArmDynarmic32::GetContext(Kernel::Svc::ThreadContext& ctx) const {
|
|||||||
ctx.pc = gpr[15];
|
ctx.pc = gpr[15];
|
||||||
ctx.pstate = j.Cpsr();
|
ctx.pstate = j.Cpsr();
|
||||||
|
|
||||||
for (size_t i = 0; i < 32; i++) {
|
static_assert(sizeof(fpr) <= sizeof(ctx.v));
|
||||||
ctx.v[i] = {fpr[i], 0};
|
std::memcpy(ctx.v.data(), &fpr, sizeof(fpr));
|
||||||
}
|
|
||||||
|
|
||||||
auto [fpsr, fpcr] = FpscrToFpsrFpcr(j.Fpscr());
|
auto [fpsr, fpcr] = FpscrToFpsrFpcr(j.Fpscr());
|
||||||
ctx.fpcr = fpcr;
|
ctx.fpcr = fpcr;
|
||||||
@ -421,9 +420,8 @@ void ArmDynarmic32::SetContext(const Kernel::Svc::ThreadContext& ctx) {
|
|||||||
|
|
||||||
j.SetCpsr(ctx.pstate);
|
j.SetCpsr(ctx.pstate);
|
||||||
|
|
||||||
for (size_t i = 0; i < 32; i++) {
|
static_assert(sizeof(fpr) <= sizeof(ctx.v));
|
||||||
fpr[i] = static_cast<u32>(ctx.v[i][0]);
|
std::memcpy(&fpr, ctx.v.data(), sizeof(fpr));
|
||||||
}
|
|
||||||
|
|
||||||
j.SetFpscr(FpsrFpcrToFpscr(ctx.fpsr, ctx.fpcr));
|
j.SetFpscr(FpsrFpcrToFpscr(ctx.fpsr, ctx.fpcr));
|
||||||
m_cp15->uprw = static_cast<u32>(ctx.tpidr);
|
m_cp15->uprw = static_cast<u32>(ctx.tpidr);
|
||||||
|
Loading…
Reference in New Issue
Block a user