We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62cb7dc commit dec7b74Copy full SHA for dec7b74
ext/opcache/jit/dynasm/dasm_arm64.h
@@ -482,7 +482,12 @@ int dasm_encode(Dst_DECL, void *buffer)
482
}
483
break;
484
case DASM_REL_A: {
485
- ptrdiff_t na = (((ptrdiff_t)(*b++) << 32) | (unsigned int)n) - (ptrdiff_t)cp + 4;
+ ptrdiff_t na;
486
+ if ((ins & 0x3000) == 0x3000) { /* ADRP */
487
+ na = ((((ptrdiff_t)(*b++) << 32) | (unsigned int)n) & ~0xfff) - (((ptrdiff_t)cp + 4) & ~0xfff);
488
+ } else {
489
+ na = (((ptrdiff_t)(*b++) << 32) | (unsigned int)n) - (ptrdiff_t)cp + 4;
490
+ }
491
n = (int)na;
492
CK_REL((ptrdiff_t)n == na, na);
493
goto patchrel;
0 commit comments