diff options
| author | Ajax <commial@gmail.com> | 2015-11-10 14:48:58 +0100 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2015-11-10 14:48:58 +0100 |
| commit | 774c50d3c124863c12582b7da47411d3b33975fd (patch) | |
| tree | ec218f1edd10321432c63d4b1ea1da9443f298b4 | |
| parent | 6c3958160719e6e69415581db33f94930e570aa9 (diff) | |
| download | miasm-774c50d3c124863c12582b7da47411d3b33975fd.tar.gz miasm-774c50d3c124863c12582b7da47411d3b33975fd.zip | |
x86/sem: fldln2 must work on 64bit instead of 32
| -rw-r--r-- | miasm2/arch/x86/sem.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index 4075569d..0a39bf7e 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -2049,9 +2049,9 @@ def fldpi(ir, instr): def fldln2(ir, instr): value_f = math.log(2) - value = struct.unpack('I', struct.pack('f', value_f))[0] - return fld(ir, instr, m2_expr.ExprOp('int_32_to_double', - m2_expr.ExprInt32(value))) + value = struct.unpack('Q', struct.pack('d', value_f))[0] + return fld(ir, instr, m2_expr.ExprOp('mem_64_to_double', + m2_expr.ExprInt64(value))) def fldl2e(ir, instr): |