ARM64: Add support for ARM64e pointer authentication codes (PAC).
Contributed by Peter Cawley. #559
This commit is contained in:
@@ -171,13 +171,13 @@ static void *callback_mcode_init(global_State *g, uint32_t *page)
|
||||
static void *callback_mcode_init(global_State *g, uint32_t *page)
|
||||
{
|
||||
uint32_t *p = page;
|
||||
void *target = (void *)lj_vm_ffi_callback;
|
||||
ASMFunction target = lj_vm_ffi_callback;
|
||||
MSize slot;
|
||||
*p++ = A64I_LE(A64I_LDRLx | A64F_D(RID_X11) | A64F_S19(4));
|
||||
*p++ = A64I_LE(A64I_LDRLx | A64F_D(RID_X10) | A64F_S19(5));
|
||||
*p++ = A64I_LE(A64I_BR | A64F_N(RID_X11));
|
||||
*p++ = A64I_LE(A64I_BR_AUTH | A64F_N(RID_X11));
|
||||
*p++ = A64I_LE(A64I_NOP);
|
||||
((void **)p)[0] = target;
|
||||
((ASMFunction *)p)[0] = target;
|
||||
((void **)p)[1] = g;
|
||||
p += 4;
|
||||
for (slot = 0; slot < CALLBACK_MAX_SLOT; slot++) {
|
||||
|
||||
Reference in New Issue
Block a user