diff options
| author | Ajax <commial@gmail.com> | 2017-06-01 17:33:13 +0200 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2017-06-01 17:33:13 +0200 |
| commit | 274cff35ec85c149c9fbcccbc135349509baa31c (patch) | |
| tree | 163258e5e4981a7a2b1b53eeee16ff80b0f55e6d /test/expression/simplifications.py | |
| parent | e0235fcd5ee2e29d0b6b13cc576ae6fe23ed0b30 (diff) | |
| download | focaccia-miasm-274cff35ec85c149c9fbcccbc135349509baa31c.tar.gz focaccia-miasm-274cff35ec85c149c9fbcccbc135349509baa31c.zip | |
Add a new simplification: {@X[base + i] 0 X, @Y[base + i + X] X (X + Y)} => @(X+Y)[base + i]
Diffstat (limited to 'test/expression/simplifications.py')
| -rw-r--r-- | test/expression/simplifications.py | 5 |
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[:]: |