about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2018-05-16 15:40:52 +0200
committerAjax <commial@gmail.com>2018-05-16 15:40:52 +0200
commit5b209fe29d62f78aefab6f1d8eabb3ed41015439 (patch)
treed0aa49905feaf1df99321904257fe5e80c20cb5f
parentdb2b86a9f4d5ba1a2eafb00ca1324500e1080463 (diff)
downloadmiasm-5b209fe29d62f78aefab6f1d8eabb3ed41015439.tar.gz
miasm-5b209fe29d62f78aefab6f1d8eabb3ed41015439.zip
Add support for 128 bits udiv/umod/idiv/imod operations for CC jitters
Diffstat (limited to '')
-rw-r--r--miasm2/jitter/op_semantics.c4
-rw-r--r--miasm2/jitter/op_semantics.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/miasm2/jitter/op_semantics.c b/miasm2/jitter/op_semantics.c
index 5a8becc4..0420532a 100644
--- a/miasm2/jitter/op_semantics.c
+++ b/miasm2/jitter/op_semantics.c
@@ -778,15 +778,19 @@ uint64_t double_to_mem_64(double d)
 UDIV(16)
 UDIV(32)
 UDIV(64)
+UDIV(128)
 
 UMOD(16)
 UMOD(32)
 UMOD(64)
+UMOD(128)
 
 IDIV(16)
 IDIV(32)
 IDIV(64)
+IDIV(128)
 
 IMOD(16)
 IMOD(32)
 IMOD(64)
+IMOD(128)
diff --git a/miasm2/jitter/op_semantics.h b/miasm2/jitter/op_semantics.h
index fec140e7..3eb81cff 100644
--- a/miasm2/jitter/op_semantics.h
+++ b/miasm2/jitter/op_semantics.h
@@ -1,6 +1,9 @@
 #ifndef OP_SEMANTICS_H
 #define OP_SEMANTICS_H
 
+#define uint128_t __uint128_t
+#define int128_t __int128_t
+
 #define CC_P 1
 extern const uint8_t parity_table[256];
 #define parity(a) parity_table[(a) & 0xFF]