Skip to content

Commit

Permalink
[DYNAREC] Fix unaligned LOCK INC/DEC opcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed May 17, 2021
1 parent 2051335 commit 490a4ab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/dynarec/dynarec_arm_f0.c
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,8 @@ uintptr_t dynarecF0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
B_NEXT(c__);
MARK;
LDR_IMM9(x1, wback, 0);
LDREXB(x1, wback);
LDREXB(x3, wback);
BFI(x1, x3, 0, 8);
emit_inc32(dyn, ninst, x1, x3, x14);
STREXB(x3, x1, wback);
CMPS_IMM8(x3, 0);
Expand All @@ -928,7 +929,8 @@ uintptr_t dynarecF0(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int ninst,
B_NEXT(c__);
MARK;
LDR_IMM9(x1, wback, 0);
LDREXB(x1, wback);
LDREXB(x3, wback);
BFI(x1, x3, 0, 8);
emit_dec32(dyn, ninst, x1, x3, x14);
STREXB(x3, x1, wback);
CMPS_IMM8(x3, 0);
Expand Down

0 comments on commit 490a4ab

Please sign in to comment.