mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-30 17:53:42 +01:00
Allow changing fpu/vfpu regs.
This commit is contained in:
1 parent
608fb85f0d
commit
0c1b6fecfe
1 file changed
+31
-2
@@ -74,11 +74,40 @@ public:
|
||||
|
||||
u32 GetRegValue(int cat, int index)
|
||||
{
|
||||
return cpu->r[index];
|
||||
switch (cat)
|
||||
{
|
||||
case 0:
|
||||
return cpu->r[index];
|
||||
|
||||
case 1:
|
||||
return *(u32 *)&cpu->f[index];
|
||||
|
||||
case 2:
|
||||
return *(u32 *)&cpu->v[index];
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void SetRegValue(int cat, int index, u32 value)
|
||||
{
|
||||
cpu->r[index] = value;
|
||||
switch (cat)
|
||||
{
|
||||
case 0:
|
||||
cpu->r[index] = value;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
cpu->f[index] = *(float *)&value;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
cpu->v[index] = *(float *)&value;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user