Skip to content

Commit

Permalink
[DYNAREC] Small fixes for BTC/BSR/BSF opcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed May 10, 2021
1 parent 6239168 commit f5554de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/dynarec/dynarec_arm_0f.c
Original file line number Diff line number Diff line change
Expand Up @@ -1731,7 +1731,7 @@ uintptr_t dynarec0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
break;
case 0xBB:
INST_NAME("BTC Ed, Gd");
SETFLAGS(X_CF, SF_SET);
SETFLAGS(X_CF, SF_SUBSET);
nextop = F8;
GETGD;
if((nextop&0xC0)==0xC0) {
Expand All @@ -1756,7 +1756,7 @@ uintptr_t dynarec0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
break;
case 0xBC:
INST_NAME("BSF Gd, Ed");
SETFLAGS(X_ZF, SF_SET);
SETFLAGS(X_ZF, SF_SUBSET);
nextop = F8;
GETED;
GETGD;
Expand All @@ -1772,7 +1772,7 @@ uintptr_t dynarec0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
break;
case 0xBD:
INST_NAME("BSR Gd, Ed");
SETFLAGS(X_ZF, SF_SET);
SETFLAGS(X_ZF, SF_SUBSET);
nextop = F8;
GETED;
GETGD;
Expand Down
6 changes: 3 additions & 3 deletions src/dynarec/dynarec_arm_660f.c
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,7 @@ uintptr_t dynarec660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nins
break;
case 0xBB:
INST_NAME("BTC Ew, Gw");
SETFLAGS(X_CF, SF_SET);
SETFLAGS(X_CF, SF_SUBSET);
nextop = F8;
GETGD; // there is an AND below, to 32bits is the same
GETEW(x14);
Expand All @@ -1417,7 +1417,7 @@ uintptr_t dynarec660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nins
break;
case 0xBC:
INST_NAME("BSF Ew,Gw");
SETFLAGS(X_ZF, SF_SET);
SETFLAGS(X_ZF, SF_SUBSET);
nextop = F8;
GETEW(x1); // Get EW
TSTS_REG_LSL_IMM5(x1, x1, 0);
Expand All @@ -1433,7 +1433,7 @@ uintptr_t dynarec660F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nins
break;
case 0xBD:
INST_NAME("BSR Ew,Gw");
SETFLAGS(X_ZF, SF_SET);
SETFLAGS(X_ZF, SF_SUBSET);
nextop = F8;
GETEW(x1); // Get EW
TSTS_REG_LSL_IMM5(x1, x1, 0);
Expand Down

0 comments on commit f5554de

Please sign in to comment.