about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2015-11-10 14:45:30 +0100
committerAjax <commial@gmail.com>2015-11-10 14:45:30 +0100
commitf395f83a09d13f7ee5a16d0a33b83de5362b4cd7 (patch)
treeca234d4306f949582ef197d964caab2b4e8a63c9
parent028525ed9bbd29931bcbae608da6454beaccf737 (diff)
downloadmiasm-f395f83a09d13f7ee5a16d0a33b83de5362b4cd7.tar.gz
miasm-f395f83a09d13f7ee5a16d0a33b83de5362b4cd7.zip
x86/sem: float_prev should not raise an Error
For instance, FSTP ST(0) will be translate (in parallel) to a drop of
ST(0) old value. This behavior should not raise an error.
Diffstat (limited to '')
-rw-r--r--miasm2/arch/x86/sem.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/miasm2/arch/x86/sem.py b/miasm2/arch/x86/sem.py
index 1c83fd02..2bc28abc 100644
--- a/miasm2/arch/x86/sem.py
+++ b/miasm2/arch/x86/sem.py
@@ -1733,7 +1733,8 @@ def float_prev(flt, popcount=1):
         return None
     i = float_list.index(flt)
     if i < popcount:
-        raise ValueError('broken index')
+        # Drop value (ex: FSTP ST(0))
+        return None
     flt = float_list[i - popcount]
     return flt