From: Luke Kenneth Casson Leighton Date: Wed, 23 Dec 2020 23:41:45 +0000 (+0000) Subject: updating sv_analys.py svp64 table X-Git-Tag: convert-csv-opcode-to-binary~997 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c5f2f1edc026b14b4bb896433ae796b7884d1040;p=libreriscv.git updating sv_analys.py svp64 table --- diff --git a/openpower/opcode_regs_deduped.mdwn b/openpower/opcode_regs_deduped.mdwn index 403ee397d..edc49125f 100644 --- a/openpower/opcode_regs_deduped.mdwn +++ b/openpower/opcode_regs_deduped.mdwn @@ -647,45 +647,45 @@ std | 2P | EXTRA3 | d:RS | s:RA | | | RA_OR_ZERO | | RS | NONE | NONE | NONE [[!table data=""" insn | Ptype | Etype | 0 | 1 | 2 | 3 | -lwarx | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -ldx | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -lwzx | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -lbarx | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -ldarx | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -lbzx | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -lharx | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -lhzx | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -lwax | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -lhax | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -ldbrx | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -lwbrx | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -lwzcix | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -lhbrx | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -lhzcix | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -lbzcix | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -ldcix | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | +lwarx | 2P | EXTRA2 | d:RT | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +ldx | 2P | EXTRA2 | d:RT | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +lwzx | 2P | EXTRA2 | d:RT | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +lbarx | 2P | EXTRA2 | d:RT | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +ldarx | 2P | EXTRA2 | d:RT | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +lbzx | 2P | EXTRA2 | d:RT | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +lharx | 2P | EXTRA2 | d:RT | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +lhzx | 2P | EXTRA2 | d:RT | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +lwax | 2P | EXTRA2 | d:RT | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +lhax | 2P | EXTRA2 | d:RT | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +ldbrx | 2P | EXTRA2 | d:RT | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +lwbrx | 2P | EXTRA2 | d:RT | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +lwzcix | 2P | EXTRA2 | d:RT | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +lhbrx | 2P | EXTRA2 | d:RT | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +lhzcix | 2P | EXTRA2 | d:RT | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +lbzcix | 2P | EXTRA2 | d:RT | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +ldcix | 2P | EXTRA2 | d:RT | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | """]] ## LDST-2R-1W-imm (LDSTRM-2P-2S1D) [[!table data=""" insn | Ptype | Etype | 0 | 1 | 2 | 3 | -stwu | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | | RS | NONE | NONE | NONE | d:RT | -stbu | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | | RS | NONE | NONE | NONE | d:RT | -sthu | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | | RS | NONE | NONE | NONE | d:RT | -stdu | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | | RS | NONE | NONE | NONE | d:RT | +stwu | 2P | EXTRA2 | d:RT | d:RA | s:RB | | RA_OR_ZERO | | RS | NONE | NONE | NONE | +stbu | 2P | EXTRA2 | d:RT | d:RA | s:RB | | RA_OR_ZERO | | RS | NONE | NONE | NONE | +sthu | 2P | EXTRA2 | d:RT | d:RA | s:RB | | RA_OR_ZERO | | RS | NONE | NONE | NONE | +stdu | 2P | EXTRA2 | d:RT | d:RA | s:RB | | RA_OR_ZERO | | RS | NONE | NONE | NONE | """]] ## LDST-2R-2W (LDSTRM-2P-2S1D) [[!table data=""" insn | Ptype | Etype | 0 | 1 | 2 | 3 | -ldux | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -lwzux | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -lbzux | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -lhzux | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -lwaux | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | -lhaux | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | d:RT | +ldux | 2P | EXTRA2 | d:RT | d:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +lwzux | 2P | EXTRA2 | d:RT | d:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +lbzux | 2P | EXTRA2 | d:RT | d:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +lhzux | 2P | EXTRA2 | d:RT | d:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +lwaux | 2P | EXTRA2 | d:RT | d:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | +lhaux | 2P | EXTRA2 | d:RT | d:RA | s:RB | | RA_OR_ZERO | RB | NONE | RT | NONE | NONE | """]] ## LDST-3R (LDSTRM-2P-3S) @@ -719,17 +719,17 @@ sthcx | 2P | EXTRA2 | s:RS,d:CR0 | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE [[!table data=""" insn | Ptype | Etype | 0 | 1 | 2 | 3 | -stdux | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | d:RT | -stwux | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | d:RT | -stbux | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | d:RT | -sthux | 2P | EXTRA2 | | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | d:RT | +stdux | 2P | EXTRA2 | d:RS | d:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | +stwux | 2P | EXTRA2 | d:RS | d:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | +stbux | 2P | EXTRA2 | d:RS | d:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | +sthux | 2P | EXTRA2 | d:RS | d:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | """]] ## CRio (RM-2P-1S1D) [[!table data=""" insn | Ptype | Etype | 0 | 1 | 2 | 3 | -mcrf | 2P | EXTRA3 | TODO | | | | NONE | NONE | NONE | NONE | BFA | BF | +mcrf | 2P | EXTRA3 | d:BF | s:BFA | | | NONE | NONE | NONE | NONE | BFA | BF | mcrxr | 2P | EXTRA3 | TODO | | | | | | | | | | mcrxrx | 2P | EXTRA3 | TODO | | | | | | | | | | 2/0=mcrfs | 2P | EXTRA3 | TODO | | | | NONE | NONE | NONE | NONE | 0 | 1 | @@ -757,7 +757,7 @@ cror | 1P | EXTRA3 | d:BT | s:BA | s:BB | | NONE | NONE | NONE | NONE | BA_BB | [[!table data=""" insn | Ptype | Etype | 0 | 1 | 2 | 3 | mfcr/mfocrf | 2P | EXTRA3 | TODO | | | | NONE | NONE | NONE | RT | WHOLE_REG | NONE | -setb | 2P | EXTRA3 | TODO | | | | NONE | NONE | NONE | RT | BFA | NONE | +setb | 2P | EXTRA3 | d:RT | s:BFA | | | NONE | NONE | NONE | RT | BFA | NONE | """]] ## 1R-CRo (RM-2P-1S1D) diff --git a/openpower/sv_analysis.py b/openpower/sv_analysis.py index 7d953707e..109e69222 100644 --- a/openpower/sv_analysis.py +++ b/openpower/sv_analysis.py @@ -364,24 +364,24 @@ def process_csvs(): res['1'] = 's:RA' # RA: Rsrc1_EXTRA2 elif value == 'LDSTRM-2P-2S1D': - if 'st' in insn and 'x' not in insn: # stwu/stbu etc + if 'st' in insn_name and 'x' not in insn_name: # stwu/stbu etc res['Etype'] = 'EXTRA2' # RM EXTRA2 type res['0'] = 'd:RS' # RS: Rdest1_EXTRA2 res['1'] = 'd:RA' # RA: Rdest2_EXTRA2 res['2'] = 's:RA' # RA: Rsrc1_EXTRA2 - if 'st' in insn and 'x' in insn: # stwux + if 'st' in insn_name and 'x' in insn_name: # stwux res['Etype'] = 'EXTRA2' # RM EXTRA2 type res['0'] = 'd:RS' # RS: Rdest1_EXTRA2 res['1'] = 'd:RA' # RA: Rdest2_EXTRA2, RA: Rsrc1_EXTRA2 res['2'] = 's:RB' # RB: Rsrc2_EXTRA2 - elif 'u' in insn: # ldux etc. + elif 'u' in insn_name: # ldux etc. res['Etype'] = 'EXTRA2' # RM EXTRA2 type res['0'] = 'd:RT' # RT: Rdest1_EXTRA2 res['1'] = 'd:RA' # RA: Rdest2_EXTRA2 res['2'] = 's:RB' # RB: Rsrc1_EXTRA2 else: res['Etype'] = 'EXTRA2' # RM EXTRA2 type - res['d0'] = 'd:RT' # RT: Rdest1_EXTRA2 + res['0'] = 'd:RT' # RT: Rdest1_EXTRA2 res['1'] = 's:RA' # RA: Rsrc1_EXTRA2 res['2'] = 's:RB' # RB: Rsrc2_EXTRA2 @@ -393,10 +393,10 @@ def process_csvs(): elif value == 'RM-2P-1S1D': res['Etype'] = 'EXTRA3' # RM EXTRA3 type - if name == 'CRio' and insn == 'mcrf': + if name == 'CRio' and insn_name == 'mcrf': res['0'] = 'd:BF' # BFA: Rdest1_EXTRA3 res['1'] = 's:BFA' # BFA: Rsrc1_EXTRA3 - elif insn == 'setb': + elif insn_name == 'setb': res['0'] = 'd:RT' # RT: Rdest1_EXTRA3 res['1'] = 's:BFA' # BFA: Rsrc1_EXTRA3 elif insn_name.startswith('cmp'): # cmpi