about summary refs log tree commit diff stats
path: root/miasm2
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2015-11-10 17:48:00 +0100
committerAjax <commial@gmail.com>2015-11-10 17:48:00 +0100
commitf7a3aa042192a38ecbd37842a8808783f4b15dba (patch)
tree42620db2c6c552a2d6b7f6973e7ff44e5d1a2e97 /miasm2
parentc7cf6d1aaf5cc61c5667b4c430cd7dfee9740439 (diff)
downloadmiasm-f7a3aa042192a38ecbd37842a8808783f4b15dba.tar.gz
miasm-f7a3aa042192a38ecbd37842a8808783f4b15dba.zip
x86/sem: mem2double must not be called on float regs
Diffstat (limited to 'miasm2')
-rw-r--r--miasm2/arch/x86/sem.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py
index d74af13d..49833b1c 100644
--- a/miasm2/arch/x86/sem.py
+++ b/miasm2/arch/x86/sem.py
@@ -1767,11 +1767,10 @@ def fcom(ir, instr, a=None, b=None):
     if a is None and b is None:
         a, b = float_st0, float_st1
     elif b is None:
-        b = a
+        b = mem2double(a)
         a = float_st0
 
     e = []
-    b = mem2double(b)
 
     e.append(m2_expr.ExprAff(float_c0, m2_expr.ExprOp('fcom_c0', a, b)))
     e.append(m2_expr.ExprAff(float_c1, m2_expr.ExprOp('fcom_c1', a, b)))