diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-02-21 18:13:49 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-02-21 18:13:49 +0100 |
| commit | f09b541ab73dc7eb753a812c3fdd4d0cc17f7b02 (patch) | |
| tree | 73e5115e5b7ab0ec320942882f9e6308653715d5 /src/emu | |
| parent | e71df7eb670a1d943a41b7c94f3fc3794bc927eb (diff) | |
| download | box64-f09b541ab73dc7eb753a812c3fdd4d0cc17f7b02.tar.gz box64-f09b541ab73dc7eb753a812c3fdd4d0cc17f7b02.zip | |
[ARM64_DYNAREC] Added RCR 8bits with constant optimisation, and fixed RCL 8bit with const
Diffstat (limited to 'src/emu')
| -rw-r--r-- | src/emu/x64run_private.c | 15 |
1 files changed, 13 insertions, 2 deletions
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: |