about summary refs log tree commit diff stats
path: root/test/expression/simplifications.py
diff options
context:
space:
mode:
authorajax <devnull@localhost>2014-06-12 17:41:05 +0200
committerajax <devnull@localhost>2014-06-12 17:41:05 +0200
commit8462e1b5b65b61e837e673229e1bae4dc78c7840 (patch)
tree9bcee641a652bca5fcb284b2f8246936aa56fcb1 /test/expression/simplifications.py
parentdcf03ce77a4baeeda8e72b5d5b44e6643cf11501 (diff)
downloadmiasm-8462e1b5b65b61e837e673229e1bae4dc78c7840.tar.gz
miasm-8462e1b5b65b61e837e673229e1bae4dc78c7840.zip
Test: Simplifications: Use ".msb()" instead of hard coded [31:32]
Diffstat (limited to 'test/expression/simplifications.py')
-rw-r--r--test/expression/simplifications.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/expression/simplifications.py b/test/expression/simplifications.py
index 7d76b6e2..9a4fbe8c 100644
--- a/test/expression/simplifications.py
+++ b/test/expression/simplifications.py
@@ -177,9 +177,9 @@ for e, e_check in to_test[:]:
 # Test conds
 
 to_test = [
-    (((a - b) ^ ((a ^ b) & ((a - b) ^ a)))[31:32],
+    (((a - b) ^ ((a ^ b) & ((a - b) ^ a))).msb(),
      ExprOp(TOK_INF_SIGNED, a, b)),
-    ((((a - b) ^ ((a ^ b) & ((a - b) ^ a))) ^ a ^ b)[31:32],
+    ((((a - b) ^ ((a ^ b) & ((a - b) ^ a))) ^ a ^ b).msb(),
      ExprOp(TOK_INF_UNSIGNED, a, b)),
     (ExprOp(TOK_INF_UNSIGNED, ExprInt32(-1), ExprInt32(3)), ExprInt1(0)),
     (ExprOp(TOK_INF_SIGNED, ExprInt32(-1), ExprInt32(3)), ExprInt1(1)),