mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-02 03:32:17 +00:00
Automatically eat prefixes in x86 jit.
Simplifies the code and makes it easier to know they're eaten even for ops not yet jitted.
This commit is contained in:
parent
6b223cf7d7
commit
f532951331
@ -119,6 +119,9 @@ public:
|
||||
void ClearCache();
|
||||
void ClearCacheAt(u32 em_address);
|
||||
|
||||
// TODO: Eat VFPU prefixes here.
|
||||
void EatPrefix() { }
|
||||
|
||||
private:
|
||||
void GenerateFixedCode();
|
||||
void FlushAll();
|
||||
|
@ -868,6 +868,7 @@ void MIPSCompileOp(u32 op)
|
||||
if (op==0)
|
||||
return;
|
||||
const MIPSInstruction *instr = MIPSGetInstruction(op);
|
||||
const int info = MIPSGetInfo(op);
|
||||
if (instr)
|
||||
{
|
||||
if (instr->compile)
|
||||
@ -877,6 +878,9 @@ void MIPSCompileOp(u32 op)
|
||||
ERROR_LOG(CPU,"MIPSCompileOp %08x failed",op);
|
||||
//MessageBox(0,"ARGH2",0,0);//compile an interpreter call
|
||||
}
|
||||
|
||||
if (info & OUT_EAT_PREFIX)
|
||||
MIPSComp::jit->EatPrefix();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -318,10 +318,14 @@ void Jit::Comp_SVQ(u32 op)
|
||||
void Jit::Comp_VDot(u32 op) {
|
||||
DISABLE;
|
||||
|
||||
// No-op.
|
||||
if (js.writeMask[0]) {
|
||||
return;
|
||||
}
|
||||
|
||||
// WARNING: No prefix support!
|
||||
if (js.MayHavePrefix()) {
|
||||
Comp_Generic(op);
|
||||
js.EatPrefix();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -365,8 +369,6 @@ void Jit::Comp_VDot(u32 op) {
|
||||
// TODO: applyprefixD here somehow (write mask etc..)
|
||||
|
||||
fpr.ReleaseSpillLocks();
|
||||
|
||||
js.EatPrefix();
|
||||
}
|
||||
|
||||
void Jit::Comp_VecDo3(u32 op) {
|
||||
@ -376,7 +378,6 @@ void Jit::Comp_VecDo3(u32 op) {
|
||||
if (js.MayHavePrefix())
|
||||
{
|
||||
Comp_Generic(op);
|
||||
js.EatPrefix();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -420,7 +421,6 @@ void Jit::Comp_VecDo3(u32 op) {
|
||||
if (xmmop == NULL)
|
||||
{
|
||||
Comp_Generic(op);
|
||||
js.EatPrefix();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -463,8 +463,6 @@ void Jit::Comp_VecDo3(u32 op) {
|
||||
}
|
||||
|
||||
fpr.ReleaseSpillLocks();
|
||||
|
||||
js.EatPrefix();
|
||||
}
|
||||
|
||||
void Jit::Comp_Mftv(u32 op) {
|
||||
|
@ -283,7 +283,8 @@ void Jit::Comp_Generic(u32 op)
|
||||
_dbg_assert_msg_(JIT, 0, "Trying to compile instruction that can't be interpreted");
|
||||
|
||||
// Might have eaten prefixes, hard to tell...
|
||||
if ((MIPSGetInfo(op) & IS_VFPU) != 0)
|
||||
const int info = MIPSGetInfo(op);
|
||||
if ((info & IS_VFPU) != 0 && (info & OUT_EAT_PREFIX) == 0)
|
||||
js.PrefixStart();
|
||||
}
|
||||
|
||||
|
@ -173,6 +173,7 @@ public:
|
||||
|
||||
void ApplyPrefixST(u8 *vregs, u32 prefix, VectorSize sz);
|
||||
void ApplyPrefixD(const u8 *vregs, u32 prefix, VectorSize sz, bool onlyWriteMask = false);
|
||||
void EatPrefix() { js.EatPrefix(); }
|
||||
|
||||
JitBlockCache *GetBlockCache() { return &blocks; }
|
||||
AsmRoutineManager &Asm() { return asm_; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user