aboutsummaryrefslogtreecommitdiff
path: root/lib/dis.h
diff options
context:
space:
mode:
authorcomex2015-01-24 21:59:37 -0500
committercomex2015-01-24 21:59:37 -0500
commit98afb15eaa8f8c31bf5763de0e3c83a845414b0a (patch)
treee603aae961ead4e596fc994ed06df884eaee7b9a /lib/dis.h
parentAdd function to deal with mprotecting RW and back. A bit more complex than t... (diff)
downloadsubstitute-98afb15eaa8f8c31bf5763de0e3c83a845414b0a.tar.gz
...
Diffstat (limited to 'lib/dis.h')
-rw-r--r--lib/dis.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/dis.h b/lib/dis.h
index 675cf17..216578c 100644
--- a/lib/dis.h
+++ b/lib/dis.h
@@ -110,3 +110,9 @@ static const unsigned null_op = -0x100;
#ifndef TARGET_DIS_SUPPORTED
#error "no disassembler for the target architecture yet"
#endif
+
+static inline void op32(void **codep, uint32_t op) {
+ *(uint32_t *) *codep = op;
+ *codep += 4;
+}
+