about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAymeric Vincent <13720957+a-vincent@users.noreply.github.com>2019-11-18 13:54:20 +0100
committerAymeric Vincent <13720957+a-vincent@users.noreply.github.com>2019-11-18 13:54:20 +0100
commit91dd6f6cf2a9588979f4a4a38254b7e2649c520d (patch)
tree9f2d4627ea26729e50696dd25f07c16848b06e80
parentcc565ff0c1875793ac153eb6f163d88c0dcab3de (diff)
downloadmiasm-91dd6f6cf2a9588979f4a4a38254b7e2649c520d.tar.gz
miasm-91dd6f6cf2a9588979f4a4a38254b7e2649c520d.zip
Fix semantics of REP prefix.
Only REPE and REPNE exist at the binary level, but Miasm allows "REP" when
assembling x86 instructions. Make the semantics aware of this instead
of ignoring the REP prefix.
The bug could not occur when disassembling a binary program.
Diffstat (limited to '')
-rw-r--r--miasm/arch/x86/sem.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/miasm/arch/x86/sem.py b/miasm/arch/x86/sem.py
index e59a9b18..69e412b9 100644
--- a/miasm/arch/x86/sem.py
+++ b/miasm/arch/x86/sem.py
@@ -5786,7 +5786,7 @@ class ir_x86_16(IntermediateRepresentation):
             instr.name.lower()](self, instr, *args)
         self.mod_pc(instr, instr_ir, extra_ir)
         instr.additional_info.except_on_instr = False
-        if instr.additional_info.g1.value & 6 == 0 or \
+        if instr.additional_info.g1.value & 14 == 0 or \
                 not instr.name in repeat_mn:
             return instr_ir, extra_ir
         if instr.name == "MOVSD" and len(instr.args) == 2: