fix concat error
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 3 Apr 2020 18:17:20 +0000 (19:17 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 3 Apr 2020 18:17:20 +0000 (19:17 +0100)
src/soc/decoder/power_pseudo.py
src/soc/decoder/pseudo/parser.py
src/soc/decoder/pseudo/pywriter.py

index 2be1760a18ebbce6d5e8a90d761963f38600a16b..8a34507c57b288596fcbc6b1cb5f6eda8333f6c3 100644 (file)
@@ -91,10 +91,15 @@ src1 <- GPR[RA]
 src1 <- src1[0:56]
 """
 
+addpcis = """
+D <- d0||d1||d2
+"""
+
 #code = testreg
 #code = cnttzd
 #code = cmpi
-code = cmpeqb
+#code = cmpeqb
+code = addpcis
 #code = bpermd
 
 def tolist(num):
index ffb8ec0fcdf1a5a48e2610adecb857230001b2f7..02bb2cc1a645d3634aace922bda2da548df89eea 100644 (file)
@@ -113,13 +113,13 @@ unary_ops = {
     }
 
 def check_concat(node): # checks if the comparison is already a concat
-    print (node)
+    print ("check concat", node)
     if not isinstance(node, ast.Call):
         return [node]
-    print (node.func.id)
+    print ("func", node.func.id)
     if node.func.id != 'concat':
         return [node]
-    return node[1]
+    return node.args
 
 
 ##########   Parser (tokens -> AST) ######
index 3ecc2f877a51aae90338f60c2beb802f08acf79b..af42c15a4b7fa462abffcca2e5466c68167ad18e 100644 (file)
@@ -34,3 +34,4 @@ class PyISAWriter(ISA):
 if __name__ == '__main__':
     isa = PyISAWriter()
     isa.write_pysource('comparefixed')
+    isa.write_pysource('fixedarith')