From 315672c14026c9dcc0b4d4696022a1fb09f3f10c Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 8 Aug 2021 15:55:50 +0100 Subject: [PATCH] add bc and bclr to sv_analysis --- openpower/isatables/RM-2P-1S1D.csv | 2 ++ src/openpower/sv/sv_analysis.py | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/openpower/isatables/RM-2P-1S1D.csv b/openpower/isatables/RM-2P-1S1D.csv index 3cd92238..1ce99641 100644 --- a/openpower/isatables/RM-2P-1S1D.csv +++ b/openpower/isatables/RM-2P-1S1D.csv @@ -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 diff --git a/src/openpower/sv/sv_analysis.py b/src/openpower/sv/sv_analysis.py index d55f13d9..d44f56b6 100644 --- a/src/openpower/sv/sv_analysis.py +++ b/src/openpower/sv/sv_analysis.py @@ -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' -- 2.30.2