decoder/power_pseudo: pass helper argument
authorDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Mon, 27 Sep 2021 19:16:22 +0000 (19:16 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 28 Sep 2021 11:06:43 +0000 (12:06 +0100)
src/openpower/decoder/power_pseudo.py

index a18d6a5feb1cf5bd5001555417f5bbccc88c8f0e..05d5938a0ac14cd7a15c81b258d145088f5508ab 100644 (file)
@@ -258,19 +258,19 @@ def get_reg_hex(reg):
     return hex(reg.value)
 
 
-def convert_to_pure_python(pcode):
+def convert_to_pure_python(pcode, helper=False):
 
-    gsc = GardenSnakeCompiler(form=None, incl_carry=False)
+    gsc = GardenSnakeCompiler(form=None, incl_carry=False, helper=helper)
 
     tree = gsc.compile(pcode, mode="exec", filename="string")
     tree = ast.fix_missing_locations(tree)
     return astor.to_source(tree)
 
 
-def convert_to_python(pcode, form, incl_carry):
+def convert_to_python(pcode, form, incl_carry, helper=False):
 
     print("form", form)
-    gsc = GardenSnakeCompiler(form=form, incl_carry=incl_carry)
+    gsc = GardenSnakeCompiler(form=form, incl_carry=incl_carry, helper=helper)
 
     tree = gsc.compile(pcode, mode="exec", filename="string")
     tree = ast.fix_missing_locations(tree)