about summary refs log tree commit diff stats
path: root/test/expression/expression_helper.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2016-10-21 16:19:09 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2016-11-04 16:45:46 +0100
commit3771288cffdd53c1ff87857374bd13c550b355dc (patch)
treeb85469ca5e38aeb54e19d24ccb4bea1ecf627b5e /test/expression/expression_helper.py
parent589d4fd9ebd61216155bba9f1988bbd5c3094a2b (diff)
downloadfocaccia-miasm-3771288cffdd53c1ff87857374bd13c550b355dc.tar.gz
focaccia-miasm-3771288cffdd53c1ff87857374bd13c550b355dc.zip
ExprCompose: add new api
The ExprComposes uses directly its arguments sizes to guess the slices
locations.
Old api:  ExprCompose([(a, 0, 32), (b, 32, 64)])
becomes:  ExprCompose(a, b)
Diffstat (limited to 'test/expression/expression_helper.py')
-rw-r--r--test/expression/expression_helper.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/expression/expression_helper.py b/test/expression/expression_helper.py
index 514a9a51..a3a8fba4 100644
--- a/test/expression/expression_helper.py
+++ b/test/expression/expression_helper.py
@@ -16,11 +16,10 @@ class TestExpressionExpressionHelper(unittest.TestCase):
         ebx = m2_expr.ExprId("EBX")
         ax = eax[0:16]
         expr = eax + ebx
-        expr = m2_expr.ExprCompose([(ax, 0, 16), (expr[16:32], 16, 32)])
+        expr = m2_expr.ExprCompose(ax, expr[16:32])
         expr2 = m2_expr.ExprMem((eax + ebx) ^ (eax), size=16)
         expr2 = expr2 | ax | expr2 | cst
-        exprf = expr - expr + m2_expr.ExprCompose([(expr2, 0, 16),
-                                                   (cst, 16, 32)])
+        exprf = expr - expr + m2_expr.ExprCompose(expr2, cst)
 
         # Identify variables
         vi = Variables_Identifier(exprf)