about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2015-07-29 16:34:12 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2015-07-29 16:40:35 +0200
commit182c86e653331a90941142efcdc26a68a259f779 (patch)
treecb202bc0b690d0f2b344ed7e3de6e5cbadcd77c8
parentaf4dad71abdbfdbdb4d371f0e9a4dc6ac937289c (diff)
downloadmiasm-182c86e653331a90941142efcdc26a68a259f779.tar.gz
miasm-182c86e653331a90941142efcdc26a68a259f779.zip
Mips/sem: fix missing msb
-rw-r--r--miasm2/arch/mips32/sem.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/miasm2/arch/mips32/sem.py b/miasm2/arch/mips32/sem.py
index 7eb9dcae..93f7d8c3 100644
--- a/miasm2/arch/mips32/sem.py
+++ b/miasm2/arch/mips32/sem.py
@@ -150,7 +150,7 @@ def sltu(arg1, arg2, arg3):
 def slt(arg1, arg2, arg3):
     """If @arg3 is less than @arg2 (signed), @arg1 is set to one. It gets zero
     otherwise."""
-    arg1 = ((arg2 - arg3) ^ ((arg2 ^ arg3) & ((arg2 - arg3) ^ arg2))).zeroExtend(32)
+    arg1 = ((arg2 - arg3) ^ ((arg2 ^ arg3) & ((arg2 - arg3) ^ arg2))).msb().zeroExtend(32)
 
 @sbuild.parse
 def l_sub(arg1, arg2, arg3):