correctly identify atomic reservation CSV file field and
[openpower-isa.git] / src / openpower / decoder / power_pseudo.py
index ec9bf0854fe1b5f306fa36dc4dc20e0b9346b0bb..05d5938a0ac14cd7a15c81b258d145088f5508ab 100644 (file)
@@ -202,7 +202,27 @@ concat_test2 = """
 [0]*(XLEN-16)
 """
 
-code = concat_test2
+concat_test3 = """
+[0]*XLEN
+"""
+
+assign_test = """
+prod[0:63] <- 5
+prod[0:XLEN-1] <- 5
+"""
+
+assign_test2 = """
+prod[0:XLEN-1] <- 5
+"""
+
+assign_test = """
+prod[0:XLEN-1] <- MULS((RA)[XLEN/2:XLEN-1], (RB)[XLEN/2:XLEN-1])
+RT[XLEN/2:XLEN-1] <- prod[0:(XLEN/2)-1]
+RT[0:(XLEN/2)-1] <- undefined(prod[0:(XLEN/2)-1])
+"""
+
+code = assign_test
+#code = concat_test3
 #code = concat_test1
 #code = XLEN_test
 #code = logictest
@@ -238,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)