diff options
| author | Ajax <commial@gmail.com> | 2015-11-10 18:42:37 +0100 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2015-11-10 18:42:37 +0100 |
| commit | c7658c8dd151b475177875d49c82b8590ae3779d (patch) | |
| tree | 34efa1ec1de73b5160e58ebc083b76821b78416c /miasm2/arch/x86/sem.py | |
| parent | 08d221f856f53329d5badf7fe9f73212f057c5e2 (diff) | |
| download | miasm-c7658c8dd151b475177875d49c82b8590ae3779d.tar.gz miasm-c7658c8dd151b475177875d49c82b8590ae3779d.zip | |
x86: always truncate float to 64 bits for now
Diffstat (limited to '')
| -rw-r--r-- | miasm2/arch/x86/sem.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py index 87979731..85723d97 100644 --- a/miasm2/arch/x86/sem.py +++ b/miasm2/arch/x86/sem.py @@ -168,7 +168,8 @@ def mem2double(arg): """ if isinstance(arg, m2_expr.ExprMem): if arg.size > 64: - raise NotImplementedError('float to long') + # TODO: move to 80 bits + arg = m2_expr.ExprMem(arg.arg, size=64) return m2_expr.ExprOp('mem_%.2d_to_double' % arg.size, arg) else: return arg @@ -1986,7 +1987,9 @@ def fstp(ir, instr, a): if isinstance(a, m2_expr.ExprMem): if a.size > 64: - raise NotImplementedError('float to long') + # TODO: move to 80 bits + a = m2_expr.ExprMem(a.arg, size=64) + src = m2_expr.ExprOp('double_to_mem_%.2d' % a.size, float_st0) e.append(m2_expr.ExprAff(a, src)) else: |