diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2017-03-30 16:24:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-30 16:24:26 +0200 |
| commit | 7947f33a61118c35a6b24aaac29337e2739216b4 (patch) | |
| tree | 6c281f7fc4efd326fb95151173b7847026a94f05 /example/expression/simplification_tools.py | |
| parent | cedf19e7d73ca8d603f2e1ed7f5306db27678e65 (diff) | |
| parent | e8916cf8cc44a0cc375af762b38798cb378b986c (diff) | |
| download | miasm-7947f33a61118c35a6b24aaac29337e2739216b4.tar.gz miasm-7947f33a61118c35a6b24aaac29337e2739216b4.zip | |
Merge pull request #509 from commial/fix/int-singleton
Fix/int singleton
Diffstat (limited to 'example/expression/simplification_tools.py')
| -rw-r--r-- | example/expression/simplification_tools.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/example/expression/simplification_tools.py b/example/expression/simplification_tools.py index 9b8aeed5..6a4ff715 100644 --- a/example/expression/simplification_tools.py +++ b/example/expression/simplification_tools.py @@ -21,8 +21,8 @@ e = ExprId('e') m = ExprMem(a) s = a[:8] -i1 = ExprInt(uint32(0x1)) -i2 = ExprInt(uint32(0x2)) +i1 = ExprInt(0x1, 32) +i2 = ExprInt(0x2, 32) cc = ExprCond(a, b, c) o = ExprCompose(a[8:16], a[:8]) @@ -33,12 +33,12 @@ l = [a[:8], b[:8], c[:8], m[:8], s, i1[:8], i2[:8], o[:8]] l2 = l[::-1] -x = ExprMem(a + b + ExprInt32(0x42)) +x = ExprMem(a + b + ExprInt(0x42, 32)) def replace_expr(e): # print 'visit', e - dct = {c + ExprInt32(0x42): d, + dct = {c + ExprInt(0x42, 32): d, a + b: c, } if e in dct: return dct[e] @@ -60,9 +60,9 @@ print z.copy() print z[:31].copy().visit(replace_expr) print 'replace' -print x.replace_expr({c + ExprInt32(0x42): d, +print x.replace_expr({c + ExprInt(0x42, 32): d, a + b: c, }) -print z.replace_expr({c + ExprInt32(0x42): d, +print z.replace_expr({c + ExprInt(0x42, 32): d, a + b: c, }) |