diff options
| author | Ajax <commial@gmail.com> | 2018-05-15 10:42:02 +0200 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2018-05-15 10:42:02 +0200 |
| commit | de4295331794e81937a5c4073c37808ec63beaa4 (patch) | |
| tree | a8b2bab4f9e91ab56442ea29d525ce6d5390536c /test/expression/simplifications.py | |
| parent | c450ece842408d2abcfc0f2ec648a4841bf0673b (diff) | |
| download | focaccia-miasm-de4295331794e81937a5c4073c37808ec63beaa4.tar.gz focaccia-miasm-de4295331794e81937a5c4073c37808ec63beaa4.zip | |
Op bsr/bsf are replaced by cnttrailzeros / cntleadzeros, defined in 0
Diffstat (limited to 'test/expression/simplifications.py')
| -rw-r--r-- | test/expression/simplifications.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/expression/simplifications.py b/test/expression/simplifications.py index 3e2e5177..a4e839cf 100644 --- a/test/expression/simplifications.py +++ b/test/expression/simplifications.py @@ -395,6 +395,15 @@ to_test = [(ExprInt(1, 32) - ExprInt(1, 32), ExprInt(0, 32)), ExprInt(0xc6, 8)), (ExprOp("imod", ExprInt(0x0123, 16), ExprInt(0xfffb, 16))[:8], ExprInt(0x01, 8)), + (ExprOp("cnttrailzeros", ExprInt(0x2, 32)), + ExprInt(0x1, 32)), + (ExprOp("cnttrailzeros", ExprInt(0x0, 32)), + ExprInt(0x20, 32)), + (ExprOp("cntleadzeros", ExprInt(0x2, 32)), + ExprInt(30, 32)), + (ExprOp("cntleadzeros", ExprInt(0x0, 32)), + ExprInt(0x20, 32)), + (ExprCompose(ExprInt(0x0123, 16), ExprMem(a + ExprInt(0x40, a.size), 16), ExprMem(a + ExprInt(0x42, a.size), 16), ExprInt(0x0321, 16)), |