about summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2017-06-02 15:47:29 +0200
committerGitHub <noreply@github.com>2017-06-02 15:47:29 +0200
commitdb9c8ea88376eb62f178829151b6a272b068b39d (patch)
tree163258e5e4981a7a2b1b53eeee16ff80b0f55e6d /test
parente0235fcd5ee2e29d0b6b13cc576ae6fe23ed0b30 (diff)
parent274cff35ec85c149c9fbcccbc135349509baa31c (diff)
downloadmiasm-db9c8ea88376eb62f178829151b6a272b068b39d.tar.gz
miasm-db9c8ea88376eb62f178829151b6a272b068b39d.zip
Merge pull request #564 from commial/feature/compose-mem-simpl
Add a new simplification merging ExprMem sharing the same base in ExprCompose
Diffstat (limited to 'test')
-rw-r--r--test/expression/simplifications.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/expression/simplifications.py b/test/expression/simplifications.py
index 60c328dc..efabddb5 100644
--- a/test/expression/simplifications.py
+++ b/test/expression/simplifications.py
@@ -314,6 +314,11 @@ to_test = [(ExprInt(1, 32) - ExprInt(1, 32), ExprInt(0, 32)),
     (ExprOp("imod", ExprInt(0x0123, 16), ExprInt(0xfffb, 16))[:8],
      ExprInt(0x01, 8)),
 
+    (ExprCompose(ExprInt(0x0123, 16), ExprMem(a + ExprInt(0x40, a.size), 16),
+                 ExprMem(a + ExprInt(0x42, a.size), 16), ExprInt(0x0321, 16)),
+     ExprCompose(ExprInt(0x0123, 16), ExprMem(a + ExprInt(0x40, a.size), 32),
+                 ExprInt(0x0321, 16))),
+
 ]
 
 for e, e_check in to_test[:]: