diff options
| author | Hugo Porcher <hugo.r.porcher@gmail.com> | 2019-03-20 21:19:34 -0400 |
|---|---|---|
| committer | Hugo Porcher <hugo.r.porcher@gmail.com> | 2019-03-20 21:19:34 -0400 |
| commit | 9352e00584b64efd54f15e2c128f7482da64ae10 (patch) | |
| tree | 1c18dd926b3319cf947baf67c1c7bbfadd076fe8 /test/expression | |
| parent | 91fb9d3f393bb511a3bdb57a38115ec29315c644 (diff) | |
| download | miasm-9352e00584b64efd54f15e2c128f7482da64ae10.tar.gz miasm-9352e00584b64efd54f15e2c128f7482da64ae10.zip | |
Add compose_and_mask simplification pass
Diffstat (limited to 'test/expression')
| -rw-r--r-- | test/expression/simplifications.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/expression/simplifications.py b/test/expression/simplifications.py index 1a22c43d..ddaa2f20 100644 --- a/test/expression/simplifications.py +++ b/test/expression/simplifications.py @@ -192,6 +192,12 @@ to_test = [(ExprInt(1, 32) - ExprInt(1, 32), ExprInt(0, 32)), ExprOp('&', a, ExprInt(0x0FFFFFFF, 32))), (ExprOp('<<', ExprOp('>>', a, ExprInt(0x4, 32)), ExprInt(0x4, 32)), ExprOp('&', a, ExprInt(0xFFFFFFF0, 32))), + + (ExprCompose(ExprInt(0x1234, 16), ExprId("a", 16)) & ExprInt(0xFF, 32), ExprInt(0x34, 8)), + (ExprCompose(ExprInt(0x12, 8), ExprInt(0x34, 8)) & ExprInt(0xFFFF, 16), ExprInt(0x3412, 16)), + (ExprCompose(ExprInt(0x12, 8), ExprInt(0x3456, 16), ExprInt(0x78, 8)) & ExprInt(0xFFFFFF, 32), ExprInt(0x345612, 32)), + (ExprCompose(ExprInt(0x1234, 16), ExprId("a", 8), ExprInt(0x67, 8)) & ExprInt(0xFFFFFFFF, 32), ExprCompose(ExprInt(0x1234, 16), ExprId("a", 8), ExprInt(0x67, 8))), + (a[:32], a), (a[:8][:8], a[:8]), (a[:16][:8], a[:8]), |