aboutsummaryrefslogtreecommitdiff
path: root/lib/x86/arch-dis.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/x86/arch-dis.h')
-rw-r--r--lib/x86/arch-dis.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/x86/arch-dis.h b/lib/x86/arch-dis.h
index 6447f38..d121549 100644
--- a/lib/x86/arch-dis.h
+++ b/lib/x86/arch-dis.h
@@ -1,6 +1,11 @@
#pragma once
#define MIN_INSN_SIZE 1
-#define TD_MAX_REWRITTEN_SIZE 100 /* XXX */
+/* min([18 * 3,
+ * 4 + 18 + 15 + 18,
+ * 6 + 12])
+ * See transform_dis_* for size figures. Technically unsafe, since we don't
+ * check for overlong x86 instructions. */
+#define TD_MAX_REWRITTEN_SIZE 55
struct arch_pcrel_info {
int reg;
@@ -8,3 +13,6 @@ struct arch_pcrel_info {
struct arch_dis_ctx {};
static inline void arch_dis_ctx_init(UNUSED struct arch_dis_ctx *ctx) {}
+static inline int arch_code_alignment(UNUSED struct arch_dis_ctx ctx) {
+ return 4;
+}