From f09b541ab73dc7eb753a812c3fdd4d0cc17f7b02 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Wed, 21 Feb 2024 18:13:49 +0100 Subject: [ARM64_DYNAREC] Added RCR 8bits with constant optimisation, and fixed RCL 8bit with const --- src/emu/x64run_private.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/emu') diff --git a/src/emu/x64run_private.c b/src/emu/x64run_private.c index 927d2d1c..5c88413e 100644 --- a/src/emu/x64run_private.c +++ b/src/emu/x64run_private.c @@ -1046,12 +1046,23 @@ void UpdateFlags(x64emu_t *emu) } CONDITIONAL_SET_FLAG(emu->res.u64 & (1L << 63), F_CF); break; - case d_rcl8: + cnt = emu->op2.u8%9; + CONDITIONAL_SET_FLAG(emu->op1.u8>>(9-cnt) & 1, F_CF); + // should for cnt==1 + CONDITIONAL_SET_FLAG(((emu->res.u8>>7) ^ ACCESS_FLAG(F_CF)) & 1, F_OF); + break; + case d_rcr8: + cnt = emu->op2.u8%9; + // should for cnt==1, using "before" CF + CONDITIONAL_SET_FLAG(((emu->res.u8>>7) ^ ACCESS_FLAG(F_CF)) & 1, F_OF); + // new CF + CONDITIONAL_SET_FLAG(((cnt==1)?emu->op1.u8:(emu->op1.u8>>(cnt-1))) & 1, F_CF); + break; + case d_rcl16: case d_rcl32: case d_rcl64: - case d_rcr8: case d_rcr16: case d_rcr32: case d_rcr64: -- cgit 1.4.1