Allow changing fpu/vfpu regs.

This commit is contained in:
Unknown W. Brackets committed 2013-02-23 12:30:18 -08:00
1 parent 608fb85f0d
commit 0c1b6fecfe
1 file changed
+31 -2
+31 -2
View File
@@ -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;
}
}
};