aboutsummaryrefslogtreecommitdiff
path: root/lib/arm64/jump-patch.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arm64/jump-patch.h')
-rw-r--r--lib/arm64/jump-patch.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/arm64/jump-patch.h b/lib/arm64/jump-patch.h
index 3d3d653..0a276ba 100644
--- a/lib/arm64/jump-patch.h
+++ b/lib/arm64/jump-patch.h
@@ -1,12 +1,13 @@
#pragma once
#include "arm64/assemble.h"
-#define MAX_JUMP_PATCH_SIZE 12
+#define MAX_JUMP_PATCH_SIZE 20
+
static inline int jump_patch_size(uintptr_t pc, uintptr_t dpc,
UNUSED struct arch_dis_ctx arch,
bool force) {
intptr_t diff = (dpc & ~0xfff) - (pc & ~0xfff);
if (!(diff >= -0x100000000 && diff < 0x100000000))
- return force ? 16 : -1;
+ return force ? (size_of_MOVi64(dpc) + 4) : -1;
else if (!(dpc & 0xfff))
return 8;
else