--- /dev/null
+insn,mode,CONDITIONS,Ptype,Etype,SM,0,1,2,3,in1,in2,in3,out,CR in,CR out,out2
+bc,BRANCH,,2P,EXTRA3,NO,s:BI,0,0,0,0,0,0,0,BI,0,0
+bclr,BRANCH,,2P,EXTRA3,NO,s:BI,0,0,0,0,0,0,0,BI,0,0
insn,mode,CONDITIONS,Ptype,Etype,SM,0,1,2,3,in1,in2,in3,out,CR in,CR out,out2
mcrf,NORMAL,,2P,EXTRA3,EN,d:BF,s:BFA,0,0,0,0,0,0,BFA,BF,0
-bclr,BRANCH,,2P,EXTRA3,EN,d:BI,s:BI,0,0,SPR,SPR,0,SPR,BI,0,0
mfcr/mfocrf,NORMAL,,2P,EXTRA3,EN,d:RT,s:CR,0,0,0,0,0,RT,WHOLE_REG,0,0
setb,NORMAL,,2P,EXTRA3,EN,d:RT,s:BFA,0,0,0,0,0,RT,BFA,0,0
-bc,BRANCH,,2P,EXTRA3,EN,d:BI,s:BI,0,0,SPR,0,0,SPR,BI,0,0
5/0=ftsqrt,NORMAL,,2P,EXTRA3,EN,d:BF,s:FRB,0,0,0,FRB,0,0,0,BF,0
22/7=mtfsf,NORMAL,,2P,EXTRA3,EN,d:CR1,s:FRB,0,0,0,FRB,0,0,0,CR1,0
cmpli,NORMAL,,2P,EXTRA3,EN,d:BF,s:RA,0,0,RA,0,0,0,0,BF,0
continue # skip pseudo-alias lxxxbr
if insn_name in ['mcrxr', 'mcrxrx', 'darn']:
continue
- if insn_name in ['bctar', 'bcctr']:
+ if insn_name in ['bctar', 'bcctr']: # for now. TODO
continue
if 'rfid' in insn_name:
continue
if 'addpcis' in insn_name: # skip for now
continue
+ # sv.bc is being classified as 2P-2S-1D by mistake due to SPRs
+ if insn_name.startswith('bc'):
+ # whoops: remove out reg (SPRs CTR etc)
+ row['in1'] = 'NONE'
+ row['in2'] = 'NONE'
+ row['in3'] = 'NONE'
+ row['out'] = 'NONE'
+
insns[(insn_name, condition)] = row # accumulate csv data
insn_to_csv[insn_name] = csvname_ # CSV file name by instruction
dkey = create_key(row)
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
elif insn_name == 'fishmv':
# an overwrite instruction
res['0'] = 'd:FRS' # FRS: Rdest1_EXTRA3
if insn_name == 'fmvis':
res['0'] = 'd:FRS' # FRS: Rdest1_EXTRA3
+ # HACK! thos should be RM-1P-1S butvthere is a bug with sv.bc
+ elif value == 'RM-2P-1S':
+ res['Etype'] = 'EXTRA3' # RM EXTRA3 type
+ if insn_name.startswith('bc'):
+ res['0'] = 's:BI' # BI: Rsrc1_EXTRA3
+
def process_csvs(format):
'1W-CRi': 'RM-2P-1S1D',
'CRio': 'RM-2P-1S1D',
'CR=2R1W': 'RM-1P-2S1D',
- 'CRi': 'non-SV',
+ 'CRi': 'RM-2P-1S', # HACK, bc here, it should be 1P
'imm': 'non-SV',
'': 'non-SV',
'LDST-2R-imm': 'LDSTRM-2P-2S',