Skip to content

Commit

Permalink
[DYNAREC] Optimized REP MOVSB opcode
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Feb 10, 2025
1 parent eaf2e84 commit bb164a2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/dynarec/dynarec_arm_00.c
Original file line number Diff line number Diff line change
Expand Up @@ -2520,13 +2520,22 @@ uintptr_t dynarec00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
INST_NAME("REP MOVSB");
TSTS_REG_LSL_IMM5(xECX, xECX, 0);
B_NEXT(cEQ); // end of loop
GETDIR(x3,1);
SMREAD();
GETDIR(x3, 1);
MARK2;
SUBS_IMM8(x2, xECX, 4);
B_MARK(cCC);
LDRAI_REG_LSL_IMM5(x1, xESI, x3, 2);
STRAI_REG_LSL_IMM5(x1, xEDI, x3, 2);
MOV_REG(xECX, x2);
B_MARK2(cNE);
B_MARK3(c__);
MARK;
LDRBAI_REG_LSL_IMM5(x1, xESI, x3, 0);
STRBAI_REG_LSL_IMM5(x1, xEDI, x3, 0);
SUBS_IMM8(xECX, xECX, 1);
B_MARK(cNE);
MARK3;
SMWRITE();
// done
break;
Expand Down

0 comments on commit bb164a2

Please sign in to comment.