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
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
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
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'
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'