Merge pull request #203 from raven02/vdet-new

Implement Vdet
This commit is contained in:
Henrik Rydgård 2012-12-20 05:32:19 -08:00
commit 7f880a62ce
3 changed files with 22 additions and 2 deletions

View File

@ -931,7 +931,26 @@ namespace MIPSInt
PC += 4;
EatPrefixes();
}
void Int_Vdet(u32 op)
{
float s[4], t[4];
float d[4];
int vd = _VD;
int vs = _VS;
int vt = _VT;
VectorSize sz = GetVecSize(op);
if (sz != V_Pair)
_dbg_assert_msg_(CPU,0,"Trying to interpret instruction that can't be interpreted");
ReadVector(s, sz, vs);
ReadVector(t, sz, vt);
d[0] = s[0] * t[1] - s[1] * t[0];
ApplyPrefixD(d, sz);
WriteVector(d, sz, vd);
PC += 4;
EatPrefixes();
}
void Int_Vfad(u32 op)
{
float s[4];

View File

@ -51,6 +51,7 @@ namespace MIPSInt
void Int_Vcmp(u32 op);
void Int_Vminmax(u32 op);
void Int_Vcrs(u32 op);
void Int_Vdet(u32 op);
void Int_Vcmov(u32 op);
void Int_CrossQuat(u32 op);
void Int_VPFX(u32 op);

View File

@ -495,7 +495,7 @@ MIPSInstruction tableVFPU1[8] =
{-2},
INSTR("vhdp",&Jit::Comp_Generic, Dis_Generic, Int_VHdp, IS_VFPU),
INSTR("vcrs",&Jit::Comp_Generic, Dis_Vcrs, Int_Vcrs, IS_VFPU),
INSTR("vdet",&Jit::Comp_Generic, Dis_Generic, 0, IS_VFPU),
INSTR("vdet",&Jit::Comp_Generic, Dis_Generic, Int_Vdet, IS_VFPU),
{-2},
};