@@ -106,7 +106,7 @@ void* LinkNext(x64emu_t* emu, uintptr_t addr, void* x2, uintptr_t* x3)
106106}
107107#endif
108108
109- void DynaCall (x64emu_t * emu , uintptr_t addr )
109+ void DynaCall (x64emu_t * emu , uintptr_t addr , int no_alt )
110110{
111111 uint64_t old_rsp = R_RSP ;
112112 uint64_t old_rbx = R_RBX ;
@@ -131,7 +131,7 @@ void DynaCall(x64emu_t* emu, uintptr_t addr)
131131 emu -> df = d_none ;
132132 if (emu -> flags .quitonlongjmp )
133133 emu -> flags .need_jmpbuf = 1 ;
134- EmuRun (emu , 1 );
134+ EmuRun (emu , 1 , no_alt );
135135 emu -> quit = 0 ; // reset Quit flags...
136136 emu -> df = d_none ;
137137 if (emu -> flags .quitonlongjmp && emu -> flags .longjmp ) {
@@ -164,7 +164,7 @@ static dynablock_t* fastDBGetBlock(x64emu_t* emu, uintptr_t addr, int create, in
164164}
165165#endif
166166
167- void EmuRun (x64emu_t * emu , int use_dynarec )
167+ void EmuRun (x64emu_t * emu , int use_dynarec , int no_alt )
168168{
169169 // prepare setjump for signal handling
170170 JUMPBUFF jmpbuf [1 ] = {0 };
@@ -201,7 +201,10 @@ void EmuRun(x64emu_t* emu, int use_dynarec)
201201 }
202202 if (emu -> flags .need_jmpbuf )
203203 emu -> flags .need_jmpbuf = 0 ;
204- R_RIP = (uintptr_t )getAlternate ((void * )R_RIP );
204+ if (no_alt )
205+ no_alt = 0 ;
206+ else
207+ R_RIP = (uintptr_t )getAlternate ((void * )R_RIP );
205208#ifdef DYNAREC
206209 if (!BOX64ENV (dynarec ) || !use_dynarec )
207210#endif
@@ -278,5 +281,5 @@ void EmuRun(x64emu_t* emu, int use_dynarec)
278281
279282void DynaRun (x64emu_t * emu )
280283{
281- EmuRun (emu , 1 );
284+ EmuRun (emu , 1 , 0 );
282285}
0 commit comments