diff options
| author | Aymeric Vincent <13720957+a-vincent@users.noreply.github.com> | 2019-11-18 13:54:20 +0100 |
|---|---|---|
| committer | Aymeric Vincent <13720957+a-vincent@users.noreply.github.com> | 2019-11-18 13:54:20 +0100 |
| commit | 91dd6f6cf2a9588979f4a4a38254b7e2649c520d (patch) | |
| tree | 9f2d4627ea26729e50696dd25f07c16848b06e80 | |
| parent | cc565ff0c1875793ac153eb6f163d88c0dcab3de (diff) | |
| download | miasm-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.py | 2 |
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: |