diff options
| author | w4kfu <gw4kfu@gmail.com> | 2018-11-14 16:34:54 -0500 |
|---|---|---|
| committer | w4kfu <gw4kfu@gmail.com> | 2018-11-14 16:39:01 -0500 |
| commit | a9bdf11a126fc5d82bc0a57972512c379f858afc (patch) | |
| tree | 3fbe08c4cfd76baf5ab0d8410ae8dedaa9f30b68 /miasm2/arch/x86/sem.py | |
| parent | 599ac301037a8509cbeb3aa88a19dd314db8e683 (diff) | |
| download | miasm-a9bdf11a126fc5d82bc0a57972512c379f858afc.tar.gz miasm-a9bdf11a126fc5d82bc0a57972512c379f858afc.zip | |
fix simplification that delete affectation
Revert "X86 sem : mov assignexpr rot / shift"
Diffstat (limited to 'miasm2/arch/x86/sem.py')
| -rw-r--r-- | miasm2/arch/x86/sem.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index 565f7571..cfd7e5a7 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -638,7 +638,7 @@ def _rotate_tpl(ir, instr, dst, src, op, left=False): ] e = [] if dst.size == 32 and dst in replace_regs[64]: - e.append(m2_expr.ExprAssign(dst[:dst.size], dst)) + e.append(m2_expr.ExprAssign(dst, dst)) # Don't generate conditional shifter on constant if isinstance(shifter, m2_expr.ExprInt): if int(shifter) != 0: @@ -688,7 +688,7 @@ def rotate_with_carry_tpl(ir, instr, op, dst, src): ] e = [] if dst.size == 32 and dst in replace_regs[64]: - e.append(m2_expr.ExprAssign(dst[:dst.size], dst)) + e.append(m2_expr.ExprAssign(dst, dst)) # Don't generate conditional shifter on constant if isinstance(shifter, m2_expr.ExprInt): if int(shifter) != 0: @@ -776,7 +776,7 @@ def _shift_tpl(op, ir, instr, a, b, c=None, op_inv=None, left=False, e_do += update_flag_znp(res) e = [] if a.size == 32 and a in replace_regs[64]: - e.append(m2_expr.ExprAssign(a[:a.size], a)) + e.append(m2_expr.ExprAssign(a, a)) # Don't generate conditional shifter on constant if isinstance(shifter, m2_expr.ExprInt): if int(shifter) != 0: @@ -5652,7 +5652,6 @@ class ir_x86_16(IntermediateRepresentation): instr_ir, extra_ir = mnemo_func[ 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 \ |