diff options
| author | Camille Mougey <commial@gmail.com> | 2019-04-01 08:29:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-01 08:29:27 +0200 |
| commit | d5ed94165c1143b75185ab80f330df1ca6d94b5a (patch) | |
| tree | 205f6e2d00c9a682588ae3da48d1060a8b814e61 /test | |
| parent | 9a4b9d912de76e9e8dccb20bbae9f8bc352f0de3 (diff) | |
| parent | 34d54c3226596aed9c00e17d5803015edda93b2d (diff) | |
| download | miasm-d5ed94165c1143b75185ab80f330df1ca6d94b5a.tar.gz miasm-d5ed94165c1143b75185ab80f330df1ca6d94b5a.zip | |
Merge pull request #1011 from icecr4ck/add_simp_compose
Add compose_and_mask simplification pass
Diffstat (limited to 'test')
| -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 1a22c43d..e0b666da 100644 --- a/test/expression/simplifications.py +++ b/test/expression/simplifications.py @@ -192,6 +192,11 @@ 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(ExprId("a", 8), ExprId("b", 24)) & ExprInt(0xFF, 32), ExprCompose(ExprId("a", 8), ExprInt(0x0, 24))), + (ExprCompose(ExprId("a", 8), ExprInt(0x12, 8), ExprId("b", 16)) & ExprInt(0xFFFF, 32), ExprCompose(ExprId("a", 8), ExprInt(0x12, 24))), + (ExprCompose(ExprId("a", 8), ExprInt(0x1234, 16), ExprId("b", 8)) & ExprInt(0xFFFF, 32), ExprCompose(ExprId("a", 8), ExprInt(0x34, 24))), + (a[:32], a), (a[:8][:8], a[:8]), (a[:16][:8], a[:8]), |