mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-07 05:03:35 +02:00
@@ -1365,7 +1365,32 @@ namespace MIPSInt
|
||||
PC += 4;
|
||||
EatPrefixes();
|
||||
}
|
||||
|
||||
|
||||
void Int_Vscmp(u32 op) {
|
||||
int vt = _VT;
|
||||
int vs = _VS;
|
||||
int vd = _VD;
|
||||
VectorSize sz = GetVecSize(op);
|
||||
float s[4];
|
||||
float t[4];
|
||||
float d[4];
|
||||
ReadVector(s, sz, vs);
|
||||
ApplySwizzleS(s, sz);
|
||||
ReadVector(t, sz, vt);
|
||||
ApplySwizzleT(t, sz);
|
||||
int n = GetNumVectorElements(sz);
|
||||
for (int i = 0; i < n ; i++) {
|
||||
int a=s[i] - t[i];
|
||||
if (a > 0) d[i]=1;
|
||||
else if (a < 0) d[i]=-1;
|
||||
else d[i]=0;
|
||||
}
|
||||
ApplyPrefixD(d, sz);
|
||||
WriteVector(d, sz, vd);
|
||||
PC += 4;
|
||||
EatPrefixes();
|
||||
}
|
||||
|
||||
void Int_Vsge(u32 op) {
|
||||
int vt = _VT;
|
||||
int vs = _VS;
|
||||
|
||||
@@ -50,6 +50,7 @@ namespace MIPSInt
|
||||
void Int_Vidt(u32 op);
|
||||
void Int_Vcmp(u32 op);
|
||||
void Int_Vminmax(u32 op);
|
||||
void Int_Vscmp(u32 op);
|
||||
void Int_Vcrs(u32 op);
|
||||
void Int_Vdet(u32 op);
|
||||
void Int_Vcmov(u32 op);
|
||||
|
||||
@@ -506,7 +506,7 @@ MIPSInstruction tableVFPU3[8] = //011011 xxx
|
||||
INSTR("vmin",&Jit::Comp_Generic, Dis_VectorSet3, Int_Vminmax, IS_VFPU),
|
||||
INSTR("vmax",&Jit::Comp_Generic, Dis_VectorSet3, Int_Vminmax, IS_VFPU),
|
||||
{-2},
|
||||
INSTR("vscmp",&Jit::Comp_Generic, Dis_Generic, 0, IS_VFPU),
|
||||
INSTR("vscmp",&Jit::Comp_Generic, Dis_VectorSet3, Int_Vscmp, IS_VFPU),
|
||||
INSTR("vsge",&Jit::Comp_Generic, Dis_VectorSet3, Int_Vsge, IS_VFPU),
|
||||
INSTR("vslt",&Jit::Comp_Generic, Dis_VectorSet3, Int_Vslt, IS_VFPU),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user