about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorserpilliere <fabrice.desclaux@cea.fr>2015-10-19 20:26:47 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2015-10-23 10:53:51 +0200
commit5871e7da55bbffa4cadfbdf11e73366efef37c54 (patch)
tree120fc0e58e16f0867a13c8532d502ff9eeb449e2
parent477a0dd1bd1ac0eadc9a8f4dd4d0ba1ccf52e7b6 (diff)
downloadmiasm-5871e7da55bbffa4cadfbdf11e73366efef37c54.tar.gz
miasm-5871e7da55bbffa4cadfbdf11e73366efef37c54.zip
Arch/x86/sem: fix movss
Diffstat (limited to '')
-rw-r--r--miasm2/arch/x86/sem.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py
index 645cea70..ecbd9b7b 100644
--- a/miasm2/arch/x86/sem.py
+++ b/miasm2/arch/x86/sem.py
@@ -3518,7 +3518,16 @@ def cvttss2si(ir, instr, a, b):
 
 def movss(ir, instr, a, b):
     e = []
-    e.append(m2_expr.ExprAff(a[:b.size], m2_expr.ExprOp('movss', b)))
+    if not isinstance(a, m2_expr.ExprMem) and not isinstance(b, m2_expr.ExprMem):
+        # Source and Destination xmm
+        e.append(m2_expr.ExprAff(a[:32], b[:32]))
+    elif not isinstance(b, m2_expr.ExprMem) and isinstance(a, m2_expr.ExprMem):
+        # Source XMM Destination Mem
+        e.append(m2_expr.ExprAff(a, b[:32]))
+    else:
+        # Source Mem Destination XMM
+        e.append(m2_expr.ExprAff(a, m2_expr.ExprCompose([(b, 0, 32),
+                                                         (m2_expr.ExprInt_fromsize(96, 0), 32, 128)])))
     return e, []