From 51e4f1ca317282664db40dbbd740d8b17779fa2d Mon Sep 17 00:00:00 2001 From: Frode Solheim Date: Thu, 10 Sep 2015 21:42:00 +0200 Subject: [PATCH] JIT: revert some changes in duplicate_carry / restore_carry --- jit/compemu_midfunc_x86.cpp | 18 +++++++++++++++--- jit/gencomp.cpp | 3 --- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/jit/compemu_midfunc_x86.cpp b/jit/compemu_midfunc_x86.cpp index e184a30d..21610fab 100644 --- a/jit/compemu_midfunc_x86.cpp +++ b/jit/compemu_midfunc_x86.cpp @@ -74,7 +74,11 @@ MIDFUNC(0,duplicate_carry,(void)) { evict(FLAGX); make_flags_live_internal(); - COMPCALL(setcc_m)((uintptr)live.state[FLAGX].mem,NATIVE_CC_CS); +#ifdef UAE + COMPCALL(setcc_m)((uintptr)live.state[FLAGX].mem + 1, NATIVE_CC_CS); +#else + COMPCALL(setcc_m)((uintptr)live.state[FLAGX].mem, NATIVE_CC_CS); +#endif log_vwrite(FLAGX); } MENDFUNC(0,duplicate_carry,(void)) @@ -82,12 +86,20 @@ MENDFUNC(0,duplicate_carry,(void)) MIDFUNC(0,restore_carry,(void)) { if (!have_rat_stall) { /* Not a P6 core, i.e. no partial stalls */ - bt_l_ri_noclobber(FLAGX,0); +#ifdef UAE + bt_l_ri_noclobber(FLAGX, 8); +#else + bt_l_ri_noclobber(FLAGX, 0); +#endif } else { /* Avoid the stall the above creates. This is slow on non-P6, though. */ - COMPCALL(rol_b_ri(FLAGX,8)); +#ifdef UAE + COMPCALL(rol_w_ri(FLAGX, 8)); +#else + COMPCALL(rol_b_ri(FLAGX, 8)); +#endif isclean(FLAGX); } } diff --git a/jit/gencomp.cpp b/jit/gencomp.cpp index abd7a075..98711839 100644 --- a/jit/gencomp.cpp +++ b/jit/gencomp.cpp @@ -89,9 +89,6 @@ #define DISABLE_I_MOVE16 */ -#define DISABLE_I_LSL -#define DISABLE_I_LSR - #ifdef CPU_x86_64 #define DISABLE_I_FPP #endif -- 2.47.3