Skip to content

Commit

Permalink
[ARM64] Fixed OF calculation of 8/16bit RCR opcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
ksco committed Jan 16, 2025
1 parent 166c485 commit 237290f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/dynarec/arm64/dynarec_arm64_emit_shift.c
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,8 @@ void emit_rcr8c(dynarec_arm_t* dyn, int ninst, int s1, uint32_t c, int s3, int s
LSRw_IMM(s1, s1, c); // do the rcr
IFX(X_OF) {
if(c==1) {
EORw_REG_LSR(s3, s3, s1, 7);
LSRw(s3, s1, 6);
EORw_REG_LSR(s3, s3, s3, 1);
BFIw(xFlags, s3, F_OF, 1);
} else if(box64_dynarec_test) {
BFCw(xFlags, F_OF, 1);
Expand Down Expand Up @@ -1159,7 +1160,8 @@ void emit_rcr16c(dynarec_arm_t* dyn, int ninst, int s1, uint32_t c, int s3, int
LSRx_IMM(s1, s1, c); // do the rcr
IFX(X_OF) {
if(c==1) {
EORw_REG_LSR(s3, s3, s1, 15);
LSRw(s3, s1, 14);
EORw_REG_LSR(s3, s3, s3, 1);
BFIw(xFlags, s3, F_OF, 1);
} else if(box64_dynarec_test) {
BFCw(xFlags, F_OF, 1);
Expand Down

0 comments on commit 237290f

Please sign in to comment.