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,FRB,0,FRT,0,CR1,0
-0/15=fctiwz,2P,EXTRA3,d:FRT;d:CR1,s:FRB,0,0,0,FRB,0,FRT,0,CR1,0
-4/15=fctiwuz,2P,EXTRA3,d:FRT;d:CR1,s:FRB,0,0,0,FRB,0,FRT,0,CR1,0
-25/15=fctidz,2P,EXTRA3,d:FRT;d:CR1,s:FRB,0,0,0,FRB,0,FRT,0,CR1,0
29/15=fctiduz,2P,EXTRA3,d:FRT;d:CR1,s:FRB,0,0,0,FRB,0,FRT,0,CR1,0
+30/14=fcfidu,2P,EXTRA3,d:FRT;d:CR1,s:FRB,0,0,0,FRB,0,FRT,0,CR1,0
addic.,2P,EXTRA3,d:RT;d:CR0,s:RA,0,0,RA,0,0,RT,0,CR0,0
rlwinm,2P,EXTRA3,d:RA;d:CR0,s:RS,0,0,0,0,RS,RA,0,CR0,0
andi.,2P,EXTRA3,d:RA;d:CR0,s:RS,0,0,RS,0,0,RA,0,CR0,0
def is_GPR(regname):
return regname in ['RA', 'RB', 'RC', 'RS', 'RT']
+def is_FPR(regname):
+ return regname in ['FRA', 'FRB', 'FRC', 'FRS', 'FRT']
+
def get_regtype(regname):
if is_CR_3bit(regname):
return "CR_3bit"
return "CR_5bit"
if is_GPR(regname):
return "GPR"
+ if is_FPR(regname):
+ return "FPR"
def decode_extra(rm, prefix=''):
# XXX also TODO: the LD/ST modes which are different
# https://libre-soc.org/openpower/sv/ldst/
- # encode SV-GPR field into extra, v3.0field
- if rtype == 'GPR':
+ # encode SV-GPR and SV-FPR field into extra, v3.0field
+ if rtype in ['GPR', 'FPR']:
sv_extra, field = get_extra_gpr(etype, regmode, field)
# now sanity-check. EXTRA3 is ok, EXTRA2 has limits
# (and shrink to a single bit if ok)