aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lj_asm_mips.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lj_asm_mips.h b/src/lj_asm_mips.h
index affe7d89..d0def3e1 100644
--- a/src/lj_asm_mips.h
+++ b/src/lj_asm_mips.h
@@ -2466,7 +2466,11 @@ void lj_asm_patchexit(jit_State *J, GCtrace *T, ExitNo exitno, MCode *target)
2466 MCode tjump = MIPSI_J|(((uintptr_t)target>>2)&0x03ffffffu); 2466 MCode tjump = MIPSI_J|(((uintptr_t)target>>2)&0x03ffffffu);
2467 for (p++; p < pe; p++) { 2467 for (p++; p < pe; p++) {
2468 if (*p == exitload) { /* Look for load of exit number. */ 2468 if (*p == exitload) { /* Look for load of exit number. */
2469 if (((p[-1] ^ (px-p)) & 0xffffu) == 0) { /* Look for exitstub branch. */ 2469 /* Look for exitstub branch. Yes, this covers all used branch variants. */
2470 if (((p[-1] ^ (px-p)) & 0xffffu) == 0 &&
2471 ((p[-1] & 0xf0000000u) == MIPSI_BEQ ||
2472 (p[-1] & 0xfc1e0000u) == MIPSI_BLTZ ||
2473 (p[-1] & 0xffe00000u) == MIPSI_BC1F)) {
2470 ptrdiff_t delta = target - p; 2474 ptrdiff_t delta = target - p;
2471 if (((delta + 0x8000) >> 16) == 0) { /* Patch in-range branch. */ 2475 if (((delta + 0x8000) >> 16) == 0) { /* Patch in-range branch. */
2472 patchbranch: 2476 patchbranch: