about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCamille Mougey <commial@gmail.com>2015-07-29 17:11:15 +0200
committerCamille Mougey <commial@gmail.com>2015-07-29 17:11:15 +0200
commit8f4f23c98336dbd66861aeb29ae3d8c2370a2ede (patch)
treecb202bc0b690d0f2b344ed7e3de6e5cbadcd77c8
parentaf4dad71abdbfdbdb4d371f0e9a4dc6ac937289c (diff)
parent182c86e653331a90941142efcdc26a68a259f779 (diff)
downloadmiasm-8f4f23c98336dbd66861aeb29ae3d8c2370a2ede.tar.gz
miasm-8f4f23c98336dbd66861aeb29ae3d8c2370a2ede.zip
Merge pull request #198 from serpilliere/fix_mips
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):