aboutsummaryrefslogtreecommitdiff
path: root/lib/dis.h
diff options
context:
space:
mode:
authorcomex2015-01-12 01:21:43 -0500
committercomex2015-01-12 01:22:20 -0500
commit21277f290a705c6382453f348e4a224cd7695320 (patch)
treeb3eac4e66f7aec0dede880e7405171c413497a68 /lib/dis.h
parentminor improvements (diff)
downloadsubstitute-21277f290a705c6382453f348e4a224cd7695320.tar.gz
these functions are actually pointless, since it's easier to change the *offset* for actual pc-rel loads (and the rest are accounted for, albeit implicitly in the case of add pc)
i might end up using the stack :/
Diffstat (limited to 'lib/dis.h')
-rw-r--r--lib/dis.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/dis.h b/lib/dis.h
index 09220c0..ae8c75a 100644
--- a/lib/dis.h
+++ b/lib/dis.h
@@ -59,6 +59,18 @@ static inline struct bitslice bs_slice_(struct bitslice bs, struct bitslice_run
#define bs_slice(bs, lo, size) \
bs_slice_(bs, alloca((bs).nruns * sizeof(struct bitslice_run)), lo, size)
+enum pcrel_load_mode {
+ PLM_ADR, /* just want the address */
+ PLM_U8, PLM_S8,
+ PLM_U16, PLM_S16,
+ PLM_U32, PLM_S32,
+ PLM_U64,
+ PLM_U128,
+ PLM_U32_SIMD,
+ PLM_U64_SIMD,
+ PLM_U128_SIMD,
+};
+
static const struct bitslice nullbs = { 0, NULL };
#define r(nn) nn, false, true
#define rs(nn, l, s) bs_slice(nn, l, s), false, true