From: Luke Kenneth Casson Leighton Date: Wed, 23 Dec 2020 15:34:39 +0000 (+0000) Subject: start filling in svp64 insns X-Git-Tag: convert-csv-opcode-to-binary~1008 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0262542349fd8754dc691ab8ab36cb5fb48f1630;p=libreriscv.git start filling in svp64 insns --- diff --git a/openpower/opcode_regs_deduped.mdwn b/openpower/opcode_regs_deduped.mdwn index f2c0940e9..37434dec3 100644 --- a/openpower/opcode_regs_deduped.mdwn +++ b/openpower/opcode_regs_deduped.mdwn @@ -764,18 +764,18 @@ setb | 2P | EXTRA3 | TODO | | | | NONE | NONE | NONE | RT | BFA | NONE | [[!table data=""" insn | Ptype | Etype | 0 | 1 | 2 | 3 | -cmpli | 2P | EXTRA3 | TODO | | | | RA | | NONE | NONE | NONE | BF | -cmpi | 2P | EXTRA3 | TODO | | | | RA | | NONE | NONE | NONE | BF | +cmpli | 2P | EXTRA3 | d:BF | s:RA | | | RA | | NONE | NONE | NONE | BF | +cmpi | 2P | EXTRA3 | d:BF | s:RA | | | RA | | NONE | NONE | NONE | BF | """]] ## 1R-CRio (RM-2P-2S1D) [[!table data=""" insn | Ptype | Etype | 0 | 1 | 2 | 3 | -mtcrf/mtocrf | 2P | EXTRA2 | | | | | RS | NONE | NONE | NONE | WHOLE_REG | WHOLE_REG | -darn | 2P | EXTRA2 | | | | | | | RT | | | | -5/0=ftsqrt | 2P | EXTRA2 | | | | | NONE | FRB | NONE | NONE | 0 | 1 | -22/7=mtfsf | 2P | EXTRA2 | | | | | NONE | FRB | NONE | NONE | 0 | 0 | +mtcrf/mtocrf | 2P | EXTRA2 | d:CR | s:RS | s:CR | | RS | NONE | NONE | NONE | WHOLE_REG | WHOLE_REG | +darn | 2P | EXTRA2 | TODO | | | | | | RT | | | | +5/0=ftsqrt | 2P | EXTRA2 | TODO | | | | NONE | FRB | NONE | NONE | 0 | 1 | +22/7=mtfsf | 2P | EXTRA2 | TODO | | | | NONE | FRB | NONE | NONE | 0 | 0 | """]] ## 1R-1W (RM-2P-1S1D) @@ -885,10 +885,10 @@ frsqrte | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | [[!table data=""" insn | Ptype | Etype | 0 | 1 | 2 | 3 | -cmp | 1P | EXTRA3 | TODO | | | | RA | RB | NONE | NONE | NONE | BF | -cmpl | 1P | EXTRA3 | TODO | | | | RA | RB | NONE | NONE | NONE | BF | -cmprb | 1P | EXTRA3 | TODO | | | | RA | RB | NONE | NONE | NONE | BF | -cmpeqb | 1P | EXTRA3 | TODO | | | | RA | RB | NONE | NONE | NONE | BF | +cmp | 1P | EXTRA3 | d:BF | s:RA | s:RB | | RA | RB | NONE | NONE | NONE | BF | +cmpl | 1P | EXTRA3 | d:BF | s:RA | s:RB | | RA | RB | NONE | NONE | NONE | BF | +cmprb | 1P | EXTRA3 | d:BF | s:RA | s:RB | | RA | RB | NONE | NONE | NONE | BF | +cmpeqb | 1P | EXTRA3 | d:BF | s:RA | s:RB | | RA | RB | NONE | NONE | NONE | BF | """]] ## 2R-CRio (RM-1P-2S1D) @@ -907,7 +907,7 @@ insn | Ptype | Etype | 0 | 1 | 2 | 3 | bpermd | 1P | EXTRA3 | TODO | | | | RS | RB | NONE | RA | NONE | NONE | modud | 1P | EXTRA3 | TODO | | | | RA | RB | NONE | RT | NONE | NONE | moduw | 1P | EXTRA3 | TODO | | | | RA | RB | NONE | RT | NONE | NONE | -cmpb | 1P | EXTRA3 | TODO | | | | RS | RB | NONE | RA | NONE | NONE | +cmpb | 1P | EXTRA3 | d:BF | s:RA | s:RB | | RS | RB | NONE | RA | NONE | NONE | modsd | 1P | EXTRA3 | TODO | | | | RA | RB | NONE | RT | NONE | NONE | modsw | 1P | EXTRA3 | TODO | | | | RA | RB | NONE | RT | NONE | NONE | """]] diff --git a/openpower/sv_analysis.py b/openpower/sv_analysis.py index da0df6d27..4812f8663 100644 --- a/openpower/sv_analysis.py +++ b/openpower/sv_analysis.py @@ -396,6 +396,12 @@ def process_csvs(): if key == 'CRio' and insn == 'mcrf': res['0'] = 'd:BF' # BFA: Rdest1_EXTRA3 res['1'] = 's:BFA' # BFA: Rsrc1_EXTRA3 + elif insn == '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 else: res['0'] = 'TODO' @@ -405,6 +411,19 @@ def process_csvs(): res['0'] = 'd:BT' # BT: Rdest1_EXTRA3 res['1'] = 's:BA' # BA: Rsrc1_EXTRA3 res['2'] = 's:BB' # BB: Rsrc2_EXTRA3 + elif insn_name.startswith('cmp'): # cmp + res['0'] = 'd:BF' # BF: Rdest1_EXTRA3 + res['1'] = 's:RA' # RA: Rsrc1_EXTRA3 + res['2'] = 's:RB' # RB: Rsrc1_EXTRA3 + else: + res['0'] = 'TODO' + + elif value == 'RM-2P-2S1D': + res['Etype'] = 'EXTRA2' # RM EXTRA2 type + if insn_name.startswith('mt'): # mtcrf + res['0'] = 'd:CR' # CR: Rdest1_EXTRA2 + res['1'] = 's:RS' # RS: Rsrc1_EXTRA2 + res['2'] = 's:CR' # CR: Rsrc2_EXTRA2 else: res['0'] = 'TODO'