mirror of
https://github.com/ptitSeb/box64.git
synced 2025-10-14 02:38:54 +08:00
[DYNAREC] Fixe a speed regression introduced with 3fe020572d
(for #3038)
This commit is contained in:
@@ -147,7 +147,6 @@ void DynaRun(x64emu_t* emu)
|
||||
// prepare setjump for signal handling
|
||||
JUMPBUFF jmpbuf[1] = {0};
|
||||
int skip = 0;
|
||||
int need_tf = 0;
|
||||
JUMPBUFF *old_jmpbuf = emu->jmpbuf;
|
||||
#ifdef RV64
|
||||
uintptr_t old_savesp = emu->xSPSave;
|
||||
@@ -185,7 +184,7 @@ void DynaRun(x64emu_t* emu)
|
||||
#ifdef DYNAREC
|
||||
if(!BOX64ENV(dynarec))
|
||||
#endif
|
||||
Run(emu, 0, 0);
|
||||
Run(emu, 0);
|
||||
#ifdef DYNAREC
|
||||
else {
|
||||
int newis32bits = (emu->segs[_CS]==0x23);
|
||||
@@ -217,8 +216,7 @@ void DynaRun(x64emu_t* emu)
|
||||
}
|
||||
if (BOX64ENV(dynarec_test))
|
||||
emu->test.clean = 0;
|
||||
Run(emu, 1, need_tf);
|
||||
need_tf = 0;
|
||||
Run(emu, 1);
|
||||
} else {
|
||||
dynarec_log(LOG_DEBUG, "%04d|Running DynaRec Block @%p (%p) of %d x64 insts (hash=0x%x) emu=%p\n", GetTID(), (void*)R_RIP, block->block, block->isize, block->hash, emu);
|
||||
if(!BOX64ENV(dynarec_df)) {
|
||||
@@ -226,9 +224,6 @@ void DynaRun(x64emu_t* emu)
|
||||
}
|
||||
// block is here, let's run it!
|
||||
native_prolog(emu, block->block);
|
||||
if(ACCESS_FLAG(F_TF) && !emu->quit)
|
||||
need_tf = 1;
|
||||
skip = 1;
|
||||
}
|
||||
if(emu->fork) {
|
||||
int forktype = emu->fork;
|
||||
|
@@ -560,7 +560,7 @@ void EmuCall(x64emu_t* emu, uintptr_t addr)
|
||||
PushExit(emu);
|
||||
R_RIP = addr;
|
||||
emu->df = d_none;
|
||||
Run(emu, 0, 0);
|
||||
Run(emu, 0);
|
||||
emu->quit = 0; // reset Quit flags...
|
||||
emu->df = d_none;
|
||||
if(emu->flags.quitonlongjmp && emu->flags.longjmp) {
|
||||
|
@@ -32,7 +32,7 @@
|
||||
int RunTest(x64test_t *test)
|
||||
#else
|
||||
int running32bits = 0;
|
||||
int Run(x64emu_t *emu, int step, int need_tf)
|
||||
int Run(x64emu_t *emu, int step)
|
||||
#endif
|
||||
{
|
||||
uint8_t opcode;
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
typedef struct x64emu_s x64emu_t;
|
||||
|
||||
int Run(x64emu_t *emu, int step, int need_tf);
|
||||
int Run(x64emu_t *emu, int step);
|
||||
void EmuCall(x64emu_t* emu, uintptr_t addr);
|
||||
void StopEmu(x64emu_t* emu, const char* reason, int is32bits);
|
||||
void DynaRun(x64emu_t *emu);
|
||||
|
@@ -364,7 +364,7 @@ void WINAPI BTCpuSimulate(void)
|
||||
if (box64env.dynarec)
|
||||
DynaRun(emu);
|
||||
else
|
||||
Run(emu, 0, 0);
|
||||
Run(emu, 0);
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI BTCpuThreadInit(void)
|
||||
|
Reference in New Issue
Block a user