mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-09 18:43:01 +00:00
Implement vrexp2 VFPU opcode
This commit is contained in:
parent
f44a207638
commit
a1de133d3e
@ -515,6 +515,24 @@ namespace MIPSInt
|
||||
EatPrefixes();
|
||||
}
|
||||
|
||||
void Int_VRexp2(u32 op)
|
||||
{
|
||||
float s[4], d[4];
|
||||
int vd = _VD;
|
||||
int vs = _VS;
|
||||
VectorSize sz = GetVecSize(op);
|
||||
ReadVector(s, sz, vs);
|
||||
ApplySwizzleS(s, sz);
|
||||
for (int i = 0; i < GetNumVectorElements(sz); i++)
|
||||
{
|
||||
d[i] = 1.0f / expf(s[i] * (float)M_LOG2E);
|
||||
}
|
||||
ApplyPrefixD(d, sz);
|
||||
WriteVector(d, sz, vd);
|
||||
PC += 4;
|
||||
EatPrefixes();
|
||||
}
|
||||
|
||||
void Int_Vf2i(u32 op)
|
||||
{
|
||||
float s[4];
|
||||
|
@ -62,5 +62,6 @@ namespace MIPSInt
|
||||
void Int_VrndX(u32 op);
|
||||
void Int_ColorConv(u32 op);
|
||||
void Int_Vh2f2h(u32 op);
|
||||
void Int_VRexp2(u32 op);
|
||||
}
|
||||
|
||||
|
@ -566,7 +566,7 @@ MIPSInstruction tableVFPU7[32] =
|
||||
{-2},
|
||||
INSTR("vlgb", &Jit::Comp_Generic, Dis_Generic, 0, IS_VFPU),
|
||||
//24
|
||||
{-2}, // Seen in BraveStory, initialization
|
||||
INSTR("vrexp2", &Jit::Comp_Generic, Dis_Generic, Int_VRexp2, IS_VFPU), // vrexp2 Seen in BraveStory, initialization 110100 00001110000 000 0001 0000 0000
|
||||
{-2},
|
||||
INSTR("vus2i", &Jit::Comp_Generic, Dis_Generic, 0, IS_VFPU),
|
||||
INSTR("vs2i", &Jit::Comp_Generic, Dis_Generic, 0, IS_VFPU),
|
||||
@ -854,6 +854,7 @@ const MIPSInstruction *MIPSGetInstruction(u32 op)
|
||||
if (instr->altEncoding == -2)
|
||||
{
|
||||
//BAD!!
|
||||
//ERROR_LOG(CPU, "Invalid instruction %08x in table %i, entry %i", op, (int)encoding, subop);
|
||||
return 0; //invalid instruction
|
||||
}
|
||||
encoding = (MipsEncoding)instr->altEncoding;
|
||||
|
Loading…
x
Reference in New Issue
Block a user