From 21277f290a705c6382453f348e4a224cd7695320 Mon Sep 17 00:00:00 2001 From: comex Date: Mon, 12 Jan 2015 01:21:43 -0500 Subject: 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 :/ --- lib/dis.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/dis.h') 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 -- cgit v1.2.3