aboutsummaryrefslogtreecommitdiff
path: root/lib/arm/jump-patch.h
diff options
context:
space:
mode:
authorReiko Asakura2021-03-21 15:12:30 -0400
committerReiko Asakura2021-03-21 15:12:30 -0400
commit6c94f57ea902001efa0a89617e9bc98891ca8009 (patch)
tree10413c9cb6e8afa904dc08a7209f77c44b6dc1a6 /lib/arm/jump-patch.h
parentFix wrong T bit in BLX(imm)->BLX(reg) transform (diff)
downloadsubstitute-6c94f57ea902001efa0a89617e9bc98891ca8009.tar.gz
Align Thumb jump patch to halfword boundary
No need to align to word boundary.
Diffstat (limited to 'lib/arm/jump-patch.h')
-rw-r--r--lib/arm/jump-patch.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/arm/jump-patch.h b/lib/arm/jump-patch.h
index 361e357..5dd7d18 100644
--- a/lib/arm/jump-patch.h
+++ b/lib/arm/jump-patch.h
@@ -1,14 +1,14 @@
#pragma once
#include "dis.h"
#include "arm/assemble.h"
-#define MAX_JUMP_PATCH_SIZE 12
+#define MAX_JUMP_PATCH_SIZE 10
#define MAX_EXTENDED_PATCH_SIZE (MAX_JUMP_PATCH_SIZE+14)
static inline int jump_patch_size(uint_tptr pc,
UNUSED uint_tptr dpc,
UNUSED struct arch_dis_ctx arch,
UNUSED bool force) {
- return (pc & 2) ? 12 : 8;
+ return (pc & 2) ? 10 : 8;
}
static inline void make_jump_patch(void **codep, uint_tptr pc,