diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2016-01-29 10:45:08 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2016-01-30 12:02:37 +0100 |
| commit | 4a6be2448f98ab854d8524e95b188b1072bb04dc (patch) | |
| tree | 022c3cb75ae99cb2ab7aae9db5a23b95d22d879a | |
| parent | cb8a0a9f919842c5931a477681cc0f7d0e5b403f (diff) | |
| download | miasm-4a6be2448f98ab854d8524e95b188b1072bb04dc.tar.gz miasm-4a6be2448f98ab854d8524e95b188b1072bb04dc.zip | |
X86/sem: fix movq
| -rw-r--r-- | miasm2/arch/x86/sem.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index 6dca8e8b..d1a535f1 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -272,6 +272,16 @@ def mov(ir, instr, a, b): return e, [] +def movq(ir, instr, dst, src): + if dst.size == src.size: + e = [m2_expr.ExprAff(dst, src)] + elif dst.size > src.size: + e = [m2_expr.ExprAff(dst, src.zeroExtend(dst.size))] + else: + e = [m2_expr.ExprAff(dst, src[:dst.size])] + return e, [] + + @sbuild.parse def xchg(arg1, arg2): arg1 = arg2 @@ -2874,6 +2884,7 @@ def icebp(ir, instr): return e, [] # XXX + def l_int(ir, instr, a): e = [] # XXX @@ -4290,7 +4301,7 @@ mnemo_func = {'mov': mov, "xorps": xorps, "xorpd": xorps, - "movq": mov, + "movq": movq, "pminsw": pminsw, "cvtdq2pd": cvtdq2pd, |