diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2017-03-30 16:50:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-30 16:50:42 +0200 |
| commit | 0457001e8ffad3896997e3dc237ff3a557beb784 (patch) | |
| tree | 3fca770e9ba8bd395a4f675dabd785d0ee0c3543 /test | |
| parent | 7947f33a61118c35a6b24aaac29337e2739216b4 (diff) | |
| parent | 8c211caed99021a3654c14db4cdc5c6ff0b612ee (diff) | |
| download | miasm-0457001e8ffad3896997e3dc237ff3a557beb784.tar.gz miasm-0457001e8ffad3896997e3dc237ff3a557beb784.zip | |
Merge pull request #510 from commial/feature/modinterval-mul
Feature/modinterval mul
Diffstat (limited to 'test')
| -rw-r--r-- | test/analysis/modularintervals.py | 7 | ||||
| -rw-r--r-- | test/analysis/range.py | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/test/analysis/modularintervals.py b/test/analysis/modularintervals.py index 36a29aa8..45aa82bd 100644 --- a/test/analysis/modularintervals.py +++ b/test/analysis/modularintervals.py @@ -89,6 +89,13 @@ def test(left, right): rez = (x ^ y) & mask assert rez in result + # Check MUL + result = left_i * right_i + for x in left_values: + for y in right_values: + rez = (x * y) & mask + assert rez in result + # Check >> result = left_i >> right_i for x in left_values: diff --git a/test/analysis/range.py b/test/analysis/range.py index 8b1224f9..0e38ec95 100644 --- a/test/analysis/range.py +++ b/test/analysis/range.py @@ -55,6 +55,11 @@ for expr in [ ExprInt(33, 8) % ExprInt(8, 8), a % a, a[:2].zeroExtend(8) + ExprInt(0xF, 8) % ExprCond(a[0:1], ExprInt(5, 8), ExprInt(18, 8)), + ExprInt(33, 8) * ExprInt(8, 8), + a * a, + a * ExprInt(0, 8), + ExprInt(4, 8) * a, + (a[:2].zeroExtend(8) + ExprInt(0xF, 8)) * ExprCond(a[0:1], ExprInt(5, 8), ExprInt(18, 8)), ExprOp("<<<", ExprInt(4, 8), ExprInt(1, 8)), ExprOp("<<<", ExprInt(4, 8), ExprInt(14, 8)), ExprOp("<<<", ExprInt(4, 8), a), |