about summary refs log tree commit diff stats
path: root/test/expression/simplifications.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2018-06-15 15:01:34 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2018-06-21 21:34:28 +0200
commita1b21f745fddb7979a1baa8dd48d0ff253746677 (patch)
tree13faaa9df74dbb77471741a9d10aba4f97f7d21c /test/expression/simplifications.py
parent98a60ebb7366cda9774fc0511185602cada1833b (diff)
downloadmiasm-a1b21f745fddb7979a1baa8dd48d0ff253746677.tar.gz
miasm-a1b21f745fddb7979a1baa8dd48d0ff253746677.zip
Expr: add simplification shift mask
Diffstat (limited to 'test/expression/simplifications.py')
-rw-r--r--test/expression/simplifications.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/expression/simplifications.py b/test/expression/simplifications.py
index a4e839cf..b2591a83 100644
--- a/test/expression/simplifications.py
+++ b/test/expression/simplifications.py
@@ -177,6 +177,10 @@ to_test = [(ExprInt(1, 32) - ExprInt(1, 32), ExprInt(0, 32)),
            (ExprInt(0x4142, 32)[:32], ExprInt(0x4142, 32)),
            (ExprInt(0x4142, 32)[:8], ExprInt(0x42, 8)),
            (ExprInt(0x4142, 32)[8:16], ExprInt(0x41, 8)),
+           (ExprOp('>>', ExprOp('<<', a, ExprInt(0x4, 32)), ExprInt(0x4, 32)),
+            ExprOp('&', a, ExprInt(0x0FFFFFFF, 32))),
+           (ExprOp('<<', ExprOp('>>', a, ExprInt(0x4, 32)), ExprInt(0x4, 32)),
+            ExprOp('&', a, ExprInt(0xFFFFFFF0, 32))),
            (a[:32], a),
            (a[:8][:8], a[:8]),
            (a[:16][:8], a[:8]),