Skip to content

Commit bb164a2

Browse files
committed
[DYNAREC] Optimized REP MOVSB opcode
1 parent eaf2e84 commit bb164a2

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/dynarec/dynarec_arm_00.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2520,13 +2520,22 @@ uintptr_t dynarec00(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
25202520
INST_NAME("REP MOVSB");
25212521
TSTS_REG_LSL_IMM5(xECX, xECX, 0);
25222522
B_NEXT(cEQ); // end of loop
2523-
GETDIR(x3,1);
25242523
SMREAD();
2524+
GETDIR(x3, 1);
2525+
MARK2;
2526+
SUBS_IMM8(x2, xECX, 4);
2527+
B_MARK(cCC);
2528+
LDRAI_REG_LSL_IMM5(x1, xESI, x3, 2);
2529+
STRAI_REG_LSL_IMM5(x1, xEDI, x3, 2);
2530+
MOV_REG(xECX, x2);
2531+
B_MARK2(cNE);
2532+
B_MARK3(c__);
25252533
MARK;
25262534
LDRBAI_REG_LSL_IMM5(x1, xESI, x3, 0);
25272535
STRBAI_REG_LSL_IMM5(x1, xEDI, x3, 0);
25282536
SUBS_IMM8(xECX, xECX, 1);
25292537
B_MARK(cNE);
2538+
MARK3;
25302539
SMWRITE();
25312540
// done
25322541
break;

0 commit comments

Comments
 (0)