x86 dynarec: use UpdateSystem_INTC like other recs

get rid of unused rdv_DoInterrupts and rdv_DoInterrupts_pc
This commit is contained in:
Flyinghead 2023-03-09 09:37:48 +01:00
parent 0b1f69bfd2
commit 5644e834fa
3 changed files with 6 additions and 25 deletions

View File

@ -213,23 +213,6 @@ static void ngen_FailedToFindBlock_internal() {
void (*ngen_FailedToFindBlock)() = &ngen_FailedToFindBlock_internal;
u32 DYNACALL rdv_DoInterrupts_pc(u32 pc) {
next_pc = pc;
UpdateINTC();
return next_pc;
}
u32 DYNACALL rdv_DoInterrupts(void* block_cpde)
{
RuntimeBlockInfoPtr rbi = bm_GetBlock(block_cpde);
if (!rbi)
rbi = bm_GetStaleBlock(block_cpde);
verify(rbi != nullptr);
return rdv_DoInterrupts_pc(rbi->vaddr);
}
// addr must be the physical address of the start of the block
DynarecCodeEntryPtr DYNACALL rdv_BlockCheckFail(u32 addr)
{

View File

@ -80,9 +80,6 @@ DynarecCodeEntryPtr rdv_FindOrCompile();
//code -> pointer to code of block, dpc -> if dynamic block, pc. if cond, 0 for next, 1 for branch
void* DYNACALL rdv_LinkBlock(u8* code,u32 dpc);
u32 DYNACALL rdv_DoInterrupts(void* block_cpde);
u32 DYNACALL rdv_DoInterrupts_pc(u32 pc);
//Stuff to be implemented per dynarec core
void ngen_init();

View File

@ -130,6 +130,7 @@ void X86Compiler::compile(RuntimeBlockInfo* block, bool force_checks, bool optim
test(eax, eax);
Xbyak::Label no_up;
jg(no_up);
mov(ecx, block->vaddr);
call((const void *)intc_sched);
L(no_up);
sub(dword[&Sh4cntx.cycle_counter], block->guest_cycles);
@ -485,9 +486,8 @@ void X86Compiler::genMainloop()
//do_iter:
Xbyak::Label do_iter;
L(do_iter);
pop(ecx);
call((void *)rdv_DoInterrupts);
mov(ecx, eax);
add(esp, 4); // pop intc_sched() return address
mov(ecx, dword[&Sh4cntx.pc]);
jmp(no_updateLabel);
//ngen_LinkBlock_Shared_stub:
@ -503,14 +503,15 @@ void X86Compiler::genMainloop()
// Functions called by blocks
//intc_sched:
//intc_sched: ecx: vaddr
unwinder.start((void *)getCurr());
size_t startOffset = getSize();
unwinder.endProlog(0);
Xbyak::Label intc_schedLabel;
L(intc_schedLabel);
add(dword[&Sh4cntx.cycle_counter], SH4_TIMESLICE);
call((void *)UpdateSystem);
mov(dword[&Sh4cntx.pc], ecx);
call((void *)UpdateSystem_INTC);
cmp(eax, 0);
jnz(do_iter);
ret();