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LDST_IDX,,2P,EXTRA3,EN,s:FRS;s:RA;d:RA,s:RB,0,0,RA,RB,FRS,0,0,0,RA
that_extra_reg = pairs.get(extra_reg, extra_reg)
if this_extra_reg is that_extra_reg:
bits = tuple(self.record.extra_idx(key=key, regtype=rtype))
+ if len(bits) == 0: # empty slot, do not attempt to use it!
+ continue
if this_extra_reg in found:
assert found[this_extra_reg] == bits # check identical bits
continue # skip - already found
RG: BaseRM.mode[4]
-class NormalFFRc1RM(FFRc1BaseRM, NormalBaseRM):
+class NormalFFRc1RM(FFRc1BaseRM, VLiBaseRM, NormalBaseRM):
"""normal: Rc=1: ffirst CR sel"""
+ VLi: BaseRM.mode[0]
inv: BaseRM.mode[2]
CR: BaseRM.mode[3, 4]
class NormalFFRc0RM(FFRc0BaseRM, VLiBaseRM, NormalBaseRM):
"""normal: Rc=0: ffirst z/nonz"""
+ VLi: BaseRM.mode[0]
inv: BaseRM.mode[2]
- VLi: BaseRM.mode[3]
RC1: BaseRM.mode[4]
def specifiers(self, record):
yield "lf"
-class LDSTFFRc1RM(FFRc1BaseRM, LDSTImmBaseRM):
+class LDSTFFRc1RM(FFRc1BaseRM, VLiBaseRM, LDSTImmBaseRM):
"""ld/st immediate&indexed: Rc=1: ffirst CR sel"""
VLi: BaseRM.mode[0]
inv: BaseRM.mode[2]
yield from super().specifiers(record=record, mode="ff")
-class LDSTFFRc0RM(FFRc0BaseRM, ElsBaseRM, LDSTImmBaseRM):
+class LDSTFFRc0RM(FFRc0BaseRM, VLiBaseRM, ElsBaseRM, LDSTImmBaseRM):
"""ld/st immediate&indexed: Rc=0: ffirst z/nonz"""
VLi: BaseRM.mode[0]
inv: BaseRM.mode[2]
# Please revisit this code; there is an inactive sketch below.
class CROpFF5RM(FFRc1BaseRM, PredicateBaseRM, VLiBaseRM, CROpBaseRM):
"""cr_op: ffirst 5-bit mode"""
- VLi: BaseRM[20]
+ VLi: BaseRM[19]
inv: BaseRM[21]
CR: BaseRM[22, 23]
dz: BaseRM[22]
table = (
(0b000000, 0b111000, "simple"), # simple (no Rc)
(0b001000, 0b111100, "mr"), # mapreduce (no Rc)
- (0b010001, 0b110001, "ffrc1"), # ffirst, Rc=1
- (0b010000, 0b110001, "ffrc0"), # ffirst, Rc=0
+ (0b010001, 0b010001, "ffrc1"), # ffirst, Rc=1
+ (0b010000, 0b010001, "ffrc0"), # ffirst, Rc=0
(0b100000, 0b110000, "sat"), # saturation (no Rc)
(0b001100, 0b111100, "rsvd"), # reserved
- (0b110000, 0b110000, "rsvd"), # reserved
)
mode = int(self.insn.prefix.rm.normal.mode)
search = ((mode << 1) | self.record.Rc)
res['0'] = 'd:RA;s:RA' # RA: Rdest_EXTRA3 / Rsrc_EXTRA3
res['1'] = sRS # RS: Rdsrc1_EXTRA3
elif 'st' in insn_name and 'x' in insn_name: # stwux
- res['Etype'] = 'EXTRA2' # RM EXTRA2 type
- res['0'] = 'd:RA' # RA: Rdest1_EXTRA2
- # RS: Rdest2_EXTRA2, RA: Rsrc1_EXTRA2
- res['1'] = "%s;%s" % (sRS, 's:RA')
- res['2'] = 's:RB' # RB: Rsrc2_EXTRA2
+ res['Etype'] = 'EXTRA3' # RM EXTRA2 type
+ # RS: Rdest2_EXTRA2, RA: Rsrc1_EXTRA2 / Rdest
+ res['0'] = "%s;s:RA;d:RA" % (sRS)
+ res['1'] = 's:RB' # RB: Rsrc2_EXTRA2
elif 'u' in insn_name: # ldux etc.
res['Etype'] = 'EXTRA2' # RM EXTRA2 type
res['0'] = dRT # RT: Rdest1_EXTRA2
res['0'] = 's:FRT;d:FRT;d:CR1' # FRT,CR1: Rdest1_EXTRA2
res['1'] = 's:FRB' # FRB: Rsrc1_EXTRA2
res['2'] = 's:FRA' # FRA: Rsrc2_EXTRA2
- res['3'] = '' # empty
elif regs == ['RA', 'RB', 'RC', 'RT', '', '']: # madd*
res['0'] = 'd:RT' # RT,CR0: Rdest1_EXTRA2
res['1'] = 's:RA' # RA: Rsrc1_EXTRA2
res['0'] = 's:RT;d:RT;d:CR0' # RT,CR0: Rdest1_EXTRA2
res['1'] = 's:RA' # RA: Rsrc1_EXTRA2
res['2'] = 's:RB' # RT: Rsrc2_EXTRA2
- res['3'] = '' # empty
elif regs == ['RA', 'RB', 'RT', 'RT', '', '']: # maddsubrs
res['0'] = 's:RT;d:RT' # RT: Rdest1_EXTRA2
res['1'] = 's:RA' # RA: Rsrc1_EXTRA2
res['2'] = 's:RB' # RT: Rsrc2_EXTRA2
- res['3'] = '' # empty
elif insn_name == 'isel':
res['0'] = 'd:RT' # RT: Rdest1_EXTRA2
res['1'] = 's:RA' # RA: Rsrc1_EXTRA2