Update JALR edge condition
This commit is contained in:
parent
f0848324db
commit
a88d03a12d
|
@ -1647,6 +1647,18 @@ glide64-filtering=1
|
|||
glide64-fix_tex_coord=1
|
||||
glide64-fog=0
|
||||
|
||||
[A08D0F77-6F82E38C-C:45]
|
||||
Good Name=Conker's Bad Fur Day (ECTS)
|
||||
Internal Name=CBFD ECTS
|
||||
Status=Compatible
|
||||
32bit=No
|
||||
FuncFind=2
|
||||
SMM-Cache=0
|
||||
SMM-FUNC=0
|
||||
SMM-PI DMA=0
|
||||
SMM-TLB=0
|
||||
Save Type=16kbit Eeprom
|
||||
|
||||
[373F5889-9A6CA80A-C:50]
|
||||
Good Name=Conker's Bad Fur Day (E)
|
||||
Internal Name=CONKER BFD
|
||||
|
|
|
@ -1950,10 +1950,15 @@ void CRecompilerOps::SPECIAL_JALR (void)
|
|||
if ( m_NextInstruction == NORMAL )
|
||||
{
|
||||
CPU_Message(" %X %s",m_CompilePC,R4300iOpcodeName(m_Opcode.Hex,m_CompilePC));
|
||||
if (DelaySlotEffectsCompare(m_CompilePC,m_Opcode.rs,0))
|
||||
if (DelaySlotEffectsCompare(m_CompilePC,m_Opcode.rs,0) && (m_CompilePC & 0xFFC) != 0xFFC)
|
||||
{
|
||||
CRecompilerOps::UnknownOpcode();
|
||||
return;
|
||||
if (IsConst(m_Opcode.rs)) {
|
||||
MoveConstToVariable(GetMipsRegLo(m_Opcode.rs),_PROGRAM_COUNTER, "PROGRAM_COUNTER");
|
||||
} else if (IsMapped(m_Opcode.rs)) {
|
||||
MoveX86regToVariable(GetMipsRegMapLo(m_Opcode.rs),_PROGRAM_COUNTER, "PROGRAM_COUNTER");
|
||||
} else {
|
||||
MoveX86regToVariable(Map_TempReg(x86_Any,m_Opcode.rs,FALSE),_PROGRAM_COUNTER, "PROGRAM_COUNTER");
|
||||
}
|
||||
}
|
||||
UnMap_GPR( m_Opcode.rd, FALSE);
|
||||
m_RegWorkingSet.SetMipsRegLo(m_Opcode.rd,m_CompilePC + 8);
|
||||
|
@ -1980,18 +1985,22 @@ void CRecompilerOps::SPECIAL_JALR (void)
|
|||
|
||||
m_NextInstruction = DO_DELAY_SLOT;
|
||||
} else if (m_NextInstruction == DELAY_SLOT_DONE ) {
|
||||
UpdateCounters(m_RegWorkingSet,true,true);
|
||||
if (IsConst(m_Opcode.rs)) {
|
||||
MoveConstToVariable(GetMipsRegLo(m_Opcode.rs),_PROGRAM_COUNTER, "PROGRAM_COUNTER");
|
||||
} else if (IsMapped(m_Opcode.rs)) {
|
||||
MoveX86regToVariable(GetMipsRegMapLo(m_Opcode.rs),_PROGRAM_COUNTER, "PROGRAM_COUNTER");
|
||||
if (DelaySlotEffectsCompare(m_CompilePC,m_Opcode.rs,0)) {
|
||||
m_Section->CompileExit(m_CompilePC,(DWORD)-1,m_RegWorkingSet,CExitInfo::Normal,TRUE,NULL);
|
||||
} else {
|
||||
MoveX86regToVariable(Map_TempReg(x86_Any,m_Opcode.rs,FALSE),_PROGRAM_COUNTER, "PROGRAM_COUNTER");
|
||||
}
|
||||
m_Section->CompileExit((DWORD)-1, (DWORD)-1,m_RegWorkingSet,CExitInfo::Normal,TRUE,NULL);
|
||||
if (m_Section->m_JumpSection)
|
||||
{
|
||||
m_Section->GenerateSectionLinkage();
|
||||
UpdateCounters(m_RegWorkingSet,true,true);
|
||||
if (IsConst(m_Opcode.rs)) {
|
||||
MoveConstToVariable(GetMipsRegLo(m_Opcode.rs),_PROGRAM_COUNTER, "PROGRAM_COUNTER");
|
||||
} else if (IsMapped(m_Opcode.rs)) {
|
||||
MoveX86regToVariable(GetMipsRegMapLo(m_Opcode.rs),_PROGRAM_COUNTER, "PROGRAM_COUNTER");
|
||||
} else {
|
||||
MoveX86regToVariable(Map_TempReg(x86_Any,m_Opcode.rs,FALSE),_PROGRAM_COUNTER, "PROGRAM_COUNTER");
|
||||
}
|
||||
m_Section->CompileExit((DWORD)-1, (DWORD)-1,m_RegWorkingSet,CExitInfo::Normal,TRUE,NULL);
|
||||
if (m_Section->m_JumpSection)
|
||||
{
|
||||
m_Section->GenerateSectionLinkage();
|
||||
}
|
||||
}
|
||||
m_NextInstruction = END_BLOCK;
|
||||
} else if (bHaveDebugger()) {
|
||||
|
|
Loading…
Reference in New Issue