mirror of
https://github.com/libretro/Play-.git
synced 2025-02-01 14:15:27 +00:00
Cleanup.
This commit is contained in:
parent
f5133ab86a
commit
2d229688ae
@ -42,7 +42,14 @@ void CVuBasicBlock::CompileRange(CMipsJitter* jitter)
|
||||
|
||||
auto integerBranchDelayInfo = GetIntegerBranchDelayInfo(fixedEnd);
|
||||
|
||||
uint32 pendingXgKick = 0;
|
||||
bool hasPendingXgKick = false;
|
||||
const auto clearPendingXgKick =
|
||||
[&]()
|
||||
{
|
||||
assert(hasPendingXgKick);
|
||||
EmitXgKick(jitter);
|
||||
hasPendingXgKick = false;
|
||||
};
|
||||
|
||||
for(uint32 address = m_begin; address <= fixedEnd; address += 8)
|
||||
{
|
||||
@ -63,6 +70,8 @@ void CVuBasicBlock::CompileRange(CMipsJitter* jitter)
|
||||
//No lower instruction reads Q
|
||||
assert(loOps.readQ == false);
|
||||
|
||||
bool loIsXgKick = (opcodeLo & ~(0x1F << 11)) == 0x800006FC;
|
||||
|
||||
if(loOps.syncQ)
|
||||
{
|
||||
VUShared::FlushPipeline(VUShared::g_pipeInfoQ, jitter);
|
||||
@ -133,29 +142,27 @@ void CVuBasicBlock::CompileRange(CMipsJitter* jitter)
|
||||
jitter->MD_PullRel(offsetof(CMIPS, m_State.nCOP2[savedReg]));
|
||||
}
|
||||
|
||||
if(pendingXgKick != 0)
|
||||
if(hasPendingXgKick)
|
||||
{
|
||||
EmitXgKick(jitter, pendingXgKick);
|
||||
pendingXgKick = 0;
|
||||
clearPendingXgKick();
|
||||
}
|
||||
|
||||
if((opcodeLo & ~(0x1F << 11)) == 0x800006FC)
|
||||
if(loIsXgKick)
|
||||
{
|
||||
assert(pendingXgKick == 0);
|
||||
pendingXgKick = opcodeLo;
|
||||
assert(!hasPendingXgKick);
|
||||
hasPendingXgKick = true;
|
||||
}
|
||||
|
||||
//Sanity check
|
||||
assert(jitter->IsStackEmpty());
|
||||
}
|
||||
|
||||
if(pendingXgKick != 0)
|
||||
if(hasPendingXgKick)
|
||||
{
|
||||
EmitXgKick(jitter, pendingXgKick);
|
||||
pendingXgKick = 0;
|
||||
clearPendingXgKick();
|
||||
}
|
||||
|
||||
assert(pendingXgKick == 0);
|
||||
assert(!hasPendingXgKick);
|
||||
|
||||
//Increment pipeTime
|
||||
{
|
||||
@ -265,7 +272,7 @@ bool CVuBasicBlock::CheckIsSpecialIntegerLoop(uint32 fixedEnd, unsigned int regI
|
||||
return true;
|
||||
}
|
||||
|
||||
void CVuBasicBlock::EmitXgKick(CMipsJitter* jitter, uint32 opcode)
|
||||
void CVuBasicBlock::EmitXgKick(CMipsJitter* jitter)
|
||||
{
|
||||
//Push context
|
||||
jitter->PushCtx();
|
||||
|
@ -23,5 +23,5 @@ private:
|
||||
|
||||
INTEGER_BRANCH_DELAY_INFO GetIntegerBranchDelayInfo(uint32) const;
|
||||
bool CheckIsSpecialIntegerLoop(uint32, unsigned int) const;
|
||||
static void EmitXgKick(CMipsJitter*, uint32);
|
||||
static void EmitXgKick(CMipsJitter*);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user