bykey = {}
primarykeys = set()
dictkeys = OrderedDict()
+ immediates = {}
+
+ print ("# OpenPOWER ISA register 'profile's")
+ print ('')
+ print ("this page is auto-generated, do not edit")
+ print ("created by http://libre-soc.org/openpower/sv_analysis.py")
+ print ('')
# Expand that (all .csv files)
pth = find_wiki_file("*.csv")
bykey[key].append((csvname, row['opcode'], row['comment'],
row['form'].upper() + '-Form'))
+ # detect immediates, collate them (useful info)
+ if row['in2'].startswith('CONST_'):
+ imm = row['in2'].split("_")[1]
+ if key not in immediates:
+ immediates[key] = set()
+ immediates[key].add(imm)
+
primarykeys = list(primarykeys)
primarykeys.sort()
'2R-1W-CRo': 'R',
'2R': 'non-SV',
'2R-1W': 'R',
- '1R-CRio': 'TBD',
+ '1R-CRio': 'TBD - need close inspection',
'2R-CRio': 'R',
'2R-CRo': 'R',
+ '1R': 'non-SV',
'1R-1W-CRio': 'R',
'1R-1W-CRo': 'R',
'1R-1W': 'R',
'1R-CRo': 'I',
'1R-imm': 'non-SV',
'1W': 'non-SV',
- '1W-CRi': 'TBD',
- 'CRio': 'R/TBD',
+ '1W-CRi': 'TBD - needs close inspection',
+ 'CRio': 'R/TBD - needs subdivision (cr ops)',
'CRi': 'non-SV',
'imm': 'non-SV',
'': 'non-SV',
'LDST-2R-imm': 'S',
'LDST-2R-1W-imm': 'S',
+ 'LDST-2R-1W': 'I',
+ 'LDST-2R-2W': 'I',
'LDST-1R-1W-imm': 'I',
'LDST-1R-2W-imm': 'I',
+ 'LDST-3R': 'R/TBD - st*x', # these are st*x
+ 'LDST-3R-CRo': 'R/TBD - st*x', # st*x
+ 'LDST-3R-1W': 'R/TBD - st*x', # st*x
}
print ("# map to old SV Prefix")
print ('')
print ("# keys")
print ('')
print ('[[!table data="""')
- print (tformat(tablecols) + " name |")
+ print (tformat(tablecols) + " imms | name |")
for key in primarykeys:
name = keyname(dictkeys[key])
- print (tformat(dictkeys[key].values()) + " %s |" % name)
+ row = tformat(dictkeys[key].values())
+ row += " %s | " % ("/".join(list(immediates.get(key, ""))))
+ row += " %s |" % name
+ print (row)
print ('"""]]')
print ('')