Reorder vfpu data in saved kernel contexts when loading in a new version.
This commit is contained in:
parent
55500d4bb6
commit
f9f6e9492d
3 changed files with 37 additions and 9 deletions
|
@ -520,7 +520,7 @@ public:
|
|||
|
||||
virtual void DoState(PointerWrap &p)
|
||||
{
|
||||
auto s = p.Section("Thread", 1, 3);
|
||||
auto s = p.Section("Thread", 1, 4);
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
|
@ -533,6 +533,18 @@ public:
|
|||
|
||||
// TODO: How do I "version" adding a DoState method to ThreadContext?
|
||||
p.Do(context);
|
||||
|
||||
if (s <= 3)
|
||||
{
|
||||
// We must have been loading an old state if we're here.
|
||||
// Reorder VFPU data to new order.
|
||||
float temp[128];
|
||||
memcpy(temp, context.v, 128 * sizeof(float));
|
||||
for (int i = 0; i < 128; i++) {
|
||||
context.v[voffset[i]] = temp[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (s <= 2)
|
||||
{
|
||||
context.other[4] = context.other[5];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue