about summary refs log tree commit diff stats
path: root/test/core/sembuilder.py
diff options
context:
space:
mode:
authorAjax <commial@gmail.com>2015-04-23 18:28:17 +0200
committerAjax <commial@gmail.com>2015-04-23 18:28:17 +0200
commit2f37ae22fcbd173a5554aa3fba922e7f9713cf83 (patch)
tree1c031d2b977ed9d1b5df969ed9bfabafc3975a58 /test/core/sembuilder.py
parent8797f3e11ec42747ed1593924df22fd00271e85a (diff)
downloadfocaccia-miasm-2f37ae22fcbd173a5554aa3fba922e7f9713cf83.tar.gz
focaccia-miasm-2f37ae22fcbd173a5554aa3fba922e7f9713cf83.zip
SemBuilder: Add `('X' % Y)(Z) -> ExprOp('X' % Y, Z)` and `('X')(Y) -> ExprOp('X')(Y)`
Diffstat (limited to 'test/core/sembuilder.py')
-rw-r--r--test/core/sembuilder.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/core/sembuilder.py b/test/core/sembuilder.py
index 3c1b7d3f..8d61c1b8 100644
--- a/test/core/sembuilder.py
+++ b/test/core/sembuilder.py
@@ -13,13 +13,16 @@ def test(Arg1, Arg2, Arg3):
     mem32[Arg1] = Arg2
     mem32[Arg2] = Arg3  + i32(4) - mem32[Arg1]
     Arg3 = Arg3 if Arg2 else i32(0)
-    tmpvar = i32(2)
-    Arg2 = tmpvar
+    tmpvar = 'myop'(i32(2))
+    Arg2 = ('myopsize%d' % Arg1.size)(tmpvar, Arg1)
 
 a = m2_expr.ExprId('A')
 b = m2_expr.ExprId('B')
 c = m2_expr.ExprId('C')
 ir = None
 instr = None
-print test(ir, instr, a, b, c)
+res = test(ir, instr, a, b, c)
+print res
+for statement in res[0]:
+    print statement
 print test.__doc__