about summary refs log tree commit diff stats
path: root/miasm2/arch/x86/sem.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2016-05-08 17:05:57 +0200
committerserpilliere <serpilliere@users.noreply.github.com>2016-05-08 17:05:57 +0200
commit8e41c7845c9164d94f12f7d73f12bb8804f3e196 (patch)
treec469ec22987c17307efd19a15eb191af44910d64 /miasm2/arch/x86/sem.py
parent87a9cb51960230f212eb2f3db1133fcbf53b855b (diff)
parentdcf3eed759061bc3803e5c2a11b30718ea94a709 (diff)
downloadmiasm-8e41c7845c9164d94f12f7d73f12bb8804f3e196.tar.gz
miasm-8e41c7845c9164d94f12f7d73f12bb8804f3e196.zip
Merge pull request #366 from itsacoderepo/sem_add_ud2
x86 sem: prefetchw, ud2 and lfence added
Diffstat (limited to 'miasm2/arch/x86/sem.py')
-rw-r--r--miasm2/arch/x86/sem.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py
index eb067c55..28e42353 100644
--- a/miasm2/arch/x86/sem.py
+++ b/miasm2/arch/x86/sem.py
@@ -2555,7 +2555,20 @@ def fcmovnu(ir, instr, arg1, arg2):
 
 def nop(ir, instr, a=None):
     return [], []
-
+    
+def prefetchw(ir, instr, a=None):
+    # see 4-201 on this documentation 
+    # https://www-ssl.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf
+    return [], []
+    
+def lfence(ir, instr, a=None):
+    # see 3-485 on this documentation 
+    # https://www-ssl.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-instruction-set-reference-manual-325383.pdf
+    return [], []
+    
+def ud2(ir, instr, a=None):
+    e = [m2_expr.ExprAff(exception_flags, m2_expr.ExprInt(EXCEPT_ILLEGAL_INSN, exception_flags.size))]
+    return e, []
 
 def hlt(ir, instr):
     e = []
@@ -4122,6 +4135,9 @@ mnemo_func = {'mov': mov,
               'fcomi': fcomi,
               'fcomip': fcomip,
               'nop': nop,
+              'ud2': ud2,
+              'prefetchw':prefetchw,
+              'lfence':lfence,
               'fnop': nop,  # XXX
               'hlt': hlt,
               'rdtsc': rdtsc,