about summary refs log tree commit diff stats
path: root/miasm2/core/cpu.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2018-03-07 08:18:12 +0100
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2018-04-18 09:54:46 +0200
commit27b9311cf71da7fd5392a614f23c4042081b868c (patch)
treebb1b9b47ed4427bb45b27b22019d588e476fcf29 /miasm2/core/cpu.py
parent26a551b57b7d8dd7e9a9245eef5dee1d16864c47 (diff)
downloadmiasm-27b9311cf71da7fd5392a614f23c4042081b868c.tar.gz
miasm-27b9311cf71da7fd5392a614f23c4042081b868c.zip
Arm: add some arm t2 instructions
Diffstat (limited to 'miasm2/core/cpu.py')
-rw-r--r--miasm2/core/cpu.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/miasm2/core/cpu.py b/miasm2/core/cpu.py
index aa94773f..ffda5f3a 100644
--- a/miasm2/core/cpu.py
+++ b/miasm2/core/cpu.py
@@ -1393,7 +1393,9 @@ class cls_mn(object):
                     log.debug('cannot encode %r', f)
                     can_encode = False
                     break
+
                 if f.value is not None and f.l:
+                    assert f.value <= f.lmask
                     cur_len += f.l
                 index += 1
                 if ret is True:
@@ -1557,6 +1559,8 @@ class imm_noarg(object):
         v = self.encodeval(v)
         if v is False:
             return False
+        if v > self.lmask:
+            return False
         self.value = v
         return True