arm_interface: Reduce serializing of VFP/CP15 registers to essentials

This commit is contained in:
MerryMage 2020-04-27 17:11:20 +01:00
parent d5a962cb81
commit 7b3c89b8bb

View File

@ -266,26 +266,10 @@ private:
const auto r = GetVFPReg(i); const auto r = GetVFPReg(i);
ar << r; ar << r;
} }
for (std::size_t i = 0; i < VFPSystemRegister::VFP_SYSTEM_REGISTER_COUNT; i++) { ar << GetVFPSystemReg(VFP_FPSCR);
const auto reg = static_cast<VFPSystemRegister>(i); ar << GetVFPSystemReg(VFP_FPEXC);
u32 r = 0; ar << GetCP15Register(CP15_THREAD_UPRW);
switch (reg) { ar << GetCP15Register(CP15_THREAD_URO);
case VFP_FPSCR:
case VFP_FPEXC:
r = GetVFPSystemReg(reg);
}
ar << r;
}
for (std::size_t i = 0; i < CP15Register::CP15_REGISTER_COUNT; i++) {
const auto reg = static_cast<CP15Register>(i);
u32 r = 0;
switch (reg) {
case CP15_THREAD_UPRW:
case CP15_THREAD_URO:
r = GetCP15Register(reg);
}
ar << r;
}
} }
template <class Archive> template <class Archive>
@ -310,24 +294,14 @@ private:
ar >> r; ar >> r;
SetVFPReg(i, r); SetVFPReg(i, r);
} }
for (std::size_t i = 0; i < VFPSystemRegister::VFP_SYSTEM_REGISTER_COUNT; i++) {
ar >> r; ar >> r;
const auto reg = static_cast<VFPSystemRegister>(i); SetVFPSystemReg(VFP_FPSCR, r);
switch (reg) {
case VFP_FPSCR:
case VFP_FPEXC:
SetVFPSystemReg(reg, r);
}
}
for (std::size_t i = 0; i < CP15Register::CP15_REGISTER_COUNT; i++) {
ar >> r; ar >> r;
const auto reg = static_cast<CP15Register>(i); SetVFPSystemReg(VFP_FPEXC, r);
switch (reg) { ar >> r;
case CP15_THREAD_UPRW: SetCP15Register(CP15_THREAD_UPRW, r);
case CP15_THREAD_URO: ar >> r;
SetCP15Register(reg, r); SetCP15Register(CP15_THREAD_URO, r);
}
}
} }
BOOST_SERIALIZATION_SPLIT_MEMBER() BOOST_SERIALIZATION_SPLIT_MEMBER()