[[!table data="""
insn | Ptype | Etype | 0 | 1 | 2 | 3 |
-mfcr/mfocrf | 2P | EXTRA3 | TODO | | | | NONE | NONE | NONE | RT | WHOLE_REG | NONE |
+mfcr/mfocrf | 2P | EXTRA3 | d:RT | s:CR | | | NONE | NONE | NONE | RT | WHOLE_REG | NONE |
setb | 2P | EXTRA3 | d:RT | s:BFA | | | NONE | NONE | NONE | RT | BFA | NONE |
"""]]
[[!table data="""
insn | Ptype | Etype | 0 | 1 | 2 | 3 |
-neg | 2P | EXTRA3 | TODO | | | | RA | NONE | NONE | RT | NONE | NONE |
-popcntb | 2P | EXTRA3 | TODO | | | | RS | NONE | NONE | RA | NONE | NONE |
-prtyw | 2P | EXTRA3 | TODO | | | | RS | NONE | NONE | RA | NONE | NONE |
-prtyd | 2P | EXTRA3 | TODO | | | | RS | NONE | NONE | RA | NONE | NONE |
-popcntw | 2P | EXTRA3 | TODO | | | | RS | NONE | NONE | RA | NONE | NONE |
-popcntd | 2P | EXTRA3 | TODO | | | | RS | NONE | NONE | RA | NONE | NONE |
-nego | 2P | EXTRA3 | TODO | | | | RA | NONE | NONE | RT | NONE | NONE |
+neg | 2P | EXTRA3 | d:RT | s:RA | | | RA | NONE | NONE | RT | NONE | NONE |
+popcntb | 2P | EXTRA3 | d:RS | s:RA | | | RS | NONE | NONE | RA | NONE | NONE |
+prtyw | 2P | EXTRA3 | d:RS | s:RA | | | RS | NONE | NONE | RA | NONE | NONE |
+prtyd | 2P | EXTRA3 | d:RS | s:RA | | | RS | NONE | NONE | RA | NONE | NONE |
+popcntw | 2P | EXTRA3 | d:RS | s:RA | | | RS | NONE | NONE | RA | NONE | NONE |
+popcntd | 2P | EXTRA3 | d:RS | s:RA | | | RS | NONE | NONE | RA | NONE | NONE |
+nego | 2P | EXTRA3 | d:RT | s:RA | | | RA | NONE | NONE | RT | NONE | NONE |
"""]]
## 1R-1W-imm (RM-2P-1S1D)
if name == 'CRio' and insn_name == 'mcrf':
res['0'] = 'd:BF' # BFA: Rdest1_EXTRA3
res['1'] = 's:BFA' # BFA: Rsrc1_EXTRA3
+ elif 'mfcr' in insn_name or 'mfocrf' in insn_name:
+ res['0'] = 'd:RT' # RT: Rdest1_EXTRA3
+ res['1'] = 's:CR' # CR: Rsrc1_EXTRA3
elif insn_name == 'setb':
res['0'] = 'd:RT' # RT: Rdest1_EXTRA3
res['1'] = 's:BFA' # BFA: Rsrc1_EXTRA3
elif insn_name.startswith('cmp'): # cmpi
res['0'] = 'd:BF' # BF: Rdest1_EXTRA3
res['1'] = 's:RA' # RA: Rsrc1_EXTRA3
+ elif insn_name.startswith('neg'): # neg*
+ res['0'] = 'd:RT' # RT: Rdest1_EXTRA3
+ res['1'] = 's:RA' # RA: Rsrc1_EXTRA3
+ elif (insn_name.startswith('prty') or # prty*
+ insn_name.startswith('popcnt')): # popcnt*
+ res['0'] = 'd:RS' # RS: Rdest1_EXTRA3
+ res['1'] = 's:RA' # RA: Rsrc1_EXTRA3
else:
res['0'] = 'TODO'