B/BL were swapped in the arm emitter.

Oops...
This commit is contained in:
Unknown W. Brackets committed 2014-03-14 19:15:41 -07:00
1 parent b00c98a87d
commit 48fa22b7cf
2 files changed
+8 -1

No files matched your search

+1 -1
View File
@@ -556,7 +556,7 @@ void ARMXEmitter::SetJumpTarget(FixupBranch const &branch)
_assert_msg_(JIT, distance > -0x2000000 && distance <= 0x2000000,
"SetJumpTarget out of range (%p calls %p)", code, branch.ptr);
u32 instr = (u32)(branch.condition | ((distance >> 2) & 0x00FFFFFF));
instr |= branch.type ? /* B */ 0x0A000000 : /* BL */ 0x0B000000;
instr |= branch.type == 0 ? /* B */ 0x0A000000 : /* BL */ 0x0B000000;
*(u32*)branch.ptr = instr;
}
void ARMXEmitter::B (const void *fnptr)
+7
View File
@@ -264,6 +264,13 @@ bool TestArmEmitter() {
emitter.SBFX(R0, R8, 5, 9);
RET(CheckLast(emitter, "e7a802d8 SBFX r0, r8, #5, #9"));
emitter.B_CC(CC_NEQ, code + 128);
RET(CheckLast(emitter, "1a000079 BNE &000001EC"));
emitter.SetJumpTarget(emitter.B_CC(CC_NEQ));
RET(CheckLast(emitter, "1affffff BNE &00000004"));
emitter.SetJumpTarget(emitter.BL_CC(CC_NEQ));
RET(CheckLast(emitter, "1bffffff BLNE &00000004"));
emitter.VLDR(S3, R8, 48);
RET(CheckLast(emitter, "edd81a0c VLDR s3, [r8, #48]"));
emitter.VSTR(S5, R12, -36);