add bc and bclr to sv_analysis
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 8 Aug 2021 14:55:50 +0000 (15:55 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 8 Aug 2021 14:55:50 +0000 (15:55 +0100)
openpower/isatables/RM-2P-1S1D.csv
src/openpower/sv/sv_analysis.py

index 3cd92238c101124dded6f7353111213575e151b9..1ce9964168fa7d57f160dea99d68743960a313ea 100644 (file)
@@ -1,7 +1,9 @@
 insn,CONDITIONS,Ptype,Etype,0,1,2,3,in1,in2,in3,out,CR in,CR out,out2
 mcrf,,2P,EXTRA3,d:BF,s:BFA,0,0,0,0,0,0,BFA,BF,0
+bclr,,2P,EXTRA3,d:BI,s:BI,0,0,SPR,SPR,0,SPR,BI,0,0
 mfcr/mfocrf,,2P,EXTRA3,d:RT,s:CR,0,0,0,0,0,RT,WHOLE_REG,0,0
 setb,,2P,EXTRA3,d:RT,s:BFA,0,0,0,0,0,RT,BFA,0,0
+bc,,2P,EXTRA3,d:BI,s:BI,0,0,SPR,0,0,SPR,BI,0,0
 5/0=ftsqrt,,2P,EXTRA3,d:BF,s:FRB,0,0,0,FRB,0,0,0,BF,0
 22/7=mtfsf,,2P,EXTRA3,d:CR1,s:FRB,0,0,0,FRB,0,0,0,CR1,0
 cmpli,,2P,EXTRA3,d:BF,s:RA,0,0,RA,0,0,0,0,BF,0
index d55f13d99c6da7bd5d1a1ccad7e6cd6294990e40..d44f56b6335ea7425d01189c6150f979f763da7c 100644 (file)
@@ -64,6 +64,8 @@ def create_key(row):
         if key in ['in1', 'in2', 'in3']:
             if 'in' not in res:
                 res['in'] = 0
+            if row['unit'] == 'BRANCH': # branches must not include Vector SPRs
+                continue
             if isreg(row[key]):
                 res['in'] += 1
 
@@ -205,7 +207,9 @@ def process_csvs():
                 continue # skip pseudo-alias lxxxbr
             if insn_name in ['mcrxr', 'mcrxrx', 'darn']:
                 continue
-            if insn_name.startswith('bc') or 'rfid' in insn_name:
+            if insn_name in ['bctar', 'bcctr']:
+                continue
+            if  'rfid' in insn_name:
                 continue
             if insn_name in ['setvl',]: # SVP64 opcodes
                 continue
@@ -380,6 +384,8 @@ def process_csvs():
                     else:
                         regs.append('')
 
+            print ("regs", insn_name, regs)
+
             # for LD/ST FP, use FRT/FRS not RT/RS, and use CR1 not CR0
             if insn_name.startswith("lf"):
                 dRT = 'd:FRT'
@@ -490,6 +496,9 @@ def process_csvs():
                 elif regs == ['','FRB','','FRT','','CR1']:
                     res['0'] = 'd:FRT;d:CR1' # FRT,CR1: Rdest1_EXTRA3
                     res['1'] = 's:FRB' # FRB: Rsrc1_EXTRA3
+                elif insn_name.startswith('bc'):
+                    res['0'] = 'd:BI' # BI: Rdest1_EXTRA3
+                    res['1'] = 's:BI' # BI: Rsrc1_EXTRA3
                 else:
                     res['0'] = 'TODO'