mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-01-22 05:35:54 +00:00
Initial (very inefficient) vmmov for x86 jit.
This makes #464 work (at least LittleBigPlanet), but only in x86 jit.
This commit is contained in:
parent
b8e2177591
commit
a438791e7c
@ -63,4 +63,8 @@ namespace MIPSComp
|
||||
DISABLE;
|
||||
}
|
||||
|
||||
void Comp_Vmmov(u32 op) {
|
||||
DISABLE;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -116,6 +116,7 @@ public:
|
||||
void Comp_VV2Op(u32 op);
|
||||
void Comp_Mftv(u32 op);
|
||||
void Comp_Vmtvc(u32 op);
|
||||
void Comp_Vmmov(u32 op);
|
||||
|
||||
ArmJitBlockCache *GetBlockCache() { return &blocks; }
|
||||
|
||||
|
@ -669,7 +669,7 @@ const MIPSInstruction tableVFPU6[32] = //111100 xxx
|
||||
|
||||
const MIPSInstruction tableVFPUMatrixSet1[16] = //111100 11100 0xxxx (rm x is 16)
|
||||
{
|
||||
INSTR("vmmov",&Jit::Comp_Generic, Dis_MatrixSet2, Int_Vmmov, IS_VFPU|OUT_EAT_PREFIX),
|
||||
INSTR("vmmov",&Jit::Comp_Vmmov, Dis_MatrixSet2, Int_Vmmov, IS_VFPU|OUT_EAT_PREFIX),
|
||||
{-2},
|
||||
{-2},
|
||||
INSTR("vmidt",&Jit::Comp_Generic, Dis_MatrixSet1, Int_VMatrixInit, IS_VFPU|OUT_EAT_PREFIX),
|
||||
|
@ -693,4 +693,46 @@ void Jit::Comp_Vmtvc(u32 op) {
|
||||
}
|
||||
}
|
||||
|
||||
void Jit::Comp_Vmmov(u32 op) {
|
||||
CONDITIONAL_DISABLE;
|
||||
|
||||
// TODO: This probably ignores prefixes?
|
||||
if (js.MayHavePrefix())
|
||||
DISABLE;
|
||||
|
||||
MatrixSize sz = GetMtxSize(op);
|
||||
int n = GetMatrixSide(sz);
|
||||
|
||||
u8 sregs[16], dregs[16];
|
||||
GetMatrixRegs(sregs, sz, _VS);
|
||||
GetMatrixRegs(dregs, sz, _VD);
|
||||
|
||||
// TODO: gas doesn't allow overlap, what does the PSP do?
|
||||
// Potentially detect overlap or the safe direction to move in, or just DISABLE?
|
||||
// This is very not optimal, blows the regcache everytime.
|
||||
u8 tempregs[16];
|
||||
for (int a = 0; a < n; a++)
|
||||
{
|
||||
for (int b = 0; b < n; b++)
|
||||
{
|
||||
u8 temp = (u8) fpr.GetTempV();
|
||||
fpr.MapRegV(temp, MAP_NOINIT | MAP_DIRTY);
|
||||
MOVSS(fpr.VX(temp), fpr.V(sregs[a * 4 + b]));
|
||||
fpr.StoreFromRegisterV(temp);
|
||||
tempregs[a * 4 + b] = temp;
|
||||
}
|
||||
}
|
||||
for (int a = 0; a < n; a++)
|
||||
{
|
||||
for (int b = 0; b < n; b++)
|
||||
{
|
||||
u8 temp = tempregs[a * 4 + b];
|
||||
fpr.MapRegV(temp, 0);
|
||||
MOVSS(fpr.V(dregs[a * 4 + b]), fpr.VX(temp));
|
||||
}
|
||||
}
|
||||
|
||||
fpr.ReleaseSpillLocks();
|
||||
}
|
||||
|
||||
}
|
@ -191,6 +191,7 @@ public:
|
||||
void Comp_VV2Op(u32 op);
|
||||
void Comp_Mftv(u32 op);
|
||||
void Comp_Vmtvc(u32 op);
|
||||
void Comp_Vmmov(u32 op);
|
||||
|
||||
void Comp_DoNothing(u32 op);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user