From: Luke Kenneth Casson Leighton Date: Sun, 27 Dec 2020 17:42:15 +0000 (+0000) Subject: write to CSV files instead X-Git-Tag: convert-csv-opcode-to-binary~791 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=87f62b4f023fde88854b23be86b0cbf5b789d779;p=libreriscv.git write to CSV files instead --- diff --git a/openpower/opcode_regs_deduped.mdwn b/openpower/opcode_regs_deduped.mdwn index f599e96f3..c9f306c11 100644 --- a/openpower/opcode_regs_deduped.mdwn +++ b/openpower/opcode_regs_deduped.mdwn @@ -609,442 +609,109 @@ minor_63h.csv | 0b1111 | fnmadd | -Form | # svp64 remaps ## LDST-1R-1W-imm (LDSTRM-2P-1S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -lwz | 2P | EXTRA3 | d:RT | s:RA | | | RA_OR_ZERO | | NONE | RT | NONE | NONE | -lbz | 2P | EXTRA3 | d:RT | s:RA | | | RA_OR_ZERO | | NONE | RT | NONE | NONE | -lhz | 2P | EXTRA3 | d:RT | s:RA | | | RA_OR_ZERO | | NONE | RT | NONE | NONE | -lha | 2P | EXTRA3 | d:RT | s:RA | | | RA_OR_ZERO | | NONE | RT | NONE | NONE | -ld | 2P | EXTRA3 | d:RT | s:RA | | | RA_OR_ZERO | | NONE | RT | NONE | NONE | -lwa | 2P | EXTRA3 | d:RT | s:RA | | | RA_OR_ZERO | | NONE | RT | NONE | NONE | -"""]] +[[!table format=csv file="openpower/isatables/LDSTRM-2P-1S1D.csv"]] ## LDST-1R-2W-imm (LDSTRM-2P-1S2D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -lwzu | 2P | EXTRA2 | d:RT | d:RA | s:RA | | RA_OR_ZERO | | NONE | RT | NONE | NONE | -lbzu | 2P | EXTRA2 | d:RT | d:RA | s:RA | | RA_OR_ZERO | | NONE | RT | NONE | NONE | -lhzu | 2P | EXTRA2 | d:RT | d:RA | s:RA | | RA_OR_ZERO | | NONE | RT | NONE | NONE | -lhau | 2P | EXTRA2 | d:RT | d:RA | s:RA | | RA_OR_ZERO | | NONE | RT | NONE | NONE | -ldu | 2P | EXTRA2 | d:RT | d:RA | s:RA | | RA_OR_ZERO | | NONE | RT | NONE | NONE | -"""]] +[[!table format=csv file="openpower/isatables/LDSTRM-2P-1S2D.csv"]] ## LDST-2R-imm (LDSTRM-2P-2S) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -stw | 2P | EXTRA3 | d:RS | s:RA | | | RA_OR_ZERO | | RS | NONE | NONE | NONE | -stb | 2P | EXTRA3 | d:RS | s:RA | | | RA_OR_ZERO | | RS | NONE | NONE | NONE | -sth | 2P | EXTRA3 | d:RS | s:RA | | | RA_OR_ZERO | | RS | NONE | NONE | NONE | -std | 2P | EXTRA3 | d:RS | s:RA | | | RA_OR_ZERO | | RS | NONE | NONE | NONE | -"""]] +[[!table format=csv file="openpower/isatables/LDSTRM-2P-2S.csv"]] ## LDST-2R-1W (LDSTRM-2P-2S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -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 | -"""]] +[[!table format=csv file="openpower/isatables/LDSTRM-2P-2S1D.csv"]] ## LDST-2R-1W-imm (LDSTRM-2P-2S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -stwu | 2P | EXTRA2 | d:RA | s:RS | s:RA | | RA_OR_ZERO | | RS | NONE | NONE | NONE | -stbu | 2P | EXTRA2 | d:RA | s:RS | s:RA | | RA_OR_ZERO | | RS | NONE | NONE | NONE | -sthu | 2P | EXTRA2 | d:RA | s:RS | s:RA | | RA_OR_ZERO | | RS | NONE | NONE | NONE | -stdu | 2P | EXTRA2 | d:RA | s:RS | s:RA | | RA_OR_ZERO | | RS | NONE | NONE | NONE | -"""]] +[[!table format=csv file="openpower/isatables/LDSTRM-2P-2S1D.csv"]] ## LDST-2R-2W (LDSTRM-2P-2S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -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 | -"""]] +[[!table format=csv file="openpower/isatables/LDSTRM-2P-2S1D.csv"]] ## LDST-3R (LDSTRM-2P-3S) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -stdx | 2P | EXTRA2 | s:RS | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | -stwx | 2P | EXTRA2 | s:RS | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | -stbx | 2P | EXTRA2 | s:RS | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | -sthx | 2P | EXTRA2 | s:RS | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | -stdbrx | 2P | EXTRA2 | s:RS | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | -stwbrx | 2P | EXTRA2 | s:RS | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | -stwcix | 2P | EXTRA2 | s:RS | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | -sthbrx | 2P | EXTRA2 | s:RS | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | -sthcix | 2P | EXTRA2 | s:RS | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | -stbcix | 2P | EXTRA2 | s:RS | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | -stdcix | 2P | EXTRA2 | s:RS | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | -"""]] +[[!table format=csv file="openpower/isatables/LDSTRM-2P-3S.csv"]] ## LDST-3R-CRo (LDSTRM-2P-3S) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -stwcx | 2P | EXTRA2 | s:RS,d:CR0 | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | CR0 | -stdcx | 2P | EXTRA2 | s:RS,d:CR0 | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | CR0 | -stbcx | 2P | EXTRA2 | s:RS,d:CR0 | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | CR0 | -sthcx | 2P | EXTRA2 | s:RS,d:CR0 | s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | CR0 | -"""]] +[[!table format=csv file="openpower/isatables/LDSTRM-2P-3S.csv"]] ## LDST-3R-1W (LDSTRM-2P-2S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -stdux | 2P | EXTRA2 | d:RA | s:RS,s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | -stwux | 2P | EXTRA2 | d:RA | s:RS,s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | -stbux | 2P | EXTRA2 | d:RA | s:RS,s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | -sthux | 2P | EXTRA2 | d:RA | s:RS,s:RA | s:RB | | RA_OR_ZERO | RB | RS | NONE | NONE | NONE | -"""]] +[[!table format=csv file="openpower/isatables/LDSTRM-2P-2S1D.csv"]] ## CRio (RM-2P-1S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -mcrf | 2P | EXTRA3 | d:BF | s:BFA | | | NONE | NONE | NONE | NONE | BFA | BF | -2/0=mcrfs | 2P | EXTRA3 | TODO | | | | NONE | NONE | NONE | NONE | 0 | 1 | -1/6=mtfsb1 | 2P | EXTRA3 | TODO | | | | NONE | NONE | NONE | NONE | 0 | 0 | -2/6=mtfsb0 | 2P | EXTRA3 | TODO | | | | NONE | NONE | NONE | NONE | 0 | 0 | -4/6=mtfsfi | 2P | EXTRA3 | TODO | | | | NONE | NONE | NONE | NONE | 0 | 0 | -"""]] +[[!table format=csv file="openpower/isatables/RM-2P-1S1D.csv"]] ## CR=2R1W (RM-1P-2S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -crnor | 1P | EXTRA3 | d:BT | s:BA | s:BB | | NONE | NONE | NONE | NONE | BA_BB | BT | -crandc | 1P | EXTRA3 | d:BT | s:BA | s:BB | | NONE | NONE | NONE | NONE | BA_BB | BT | -crxor | 1P | EXTRA3 | d:BT | s:BA | s:BB | | NONE | NONE | NONE | NONE | BA_BB | BT | -crnand | 1P | EXTRA3 | d:BT | s:BA | s:BB | | NONE | NONE | NONE | NONE | BA_BB | BT | -crand | 1P | EXTRA3 | d:BT | s:BA | s:BB | | NONE | NONE | NONE | NONE | BA_BB | BT | -creqv | 1P | EXTRA3 | d:BT | s:BA | s:BB | | NONE | NONE | NONE | NONE | BA_BB | BT | -crorc | 1P | EXTRA3 | d:BT | s:BA | s:BB | | NONE | NONE | NONE | NONE | BA_BB | BT | -cror | 1P | EXTRA3 | d:BT | s:BA | s:BB | | NONE | NONE | NONE | NONE | BA_BB | BT | -"""]] +[[!table format=csv file="openpower/isatables/RM-1P-2S1D.csv"]] ## 1W-CRi (RM-2P-1S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -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 format=csv file="openpower/isatables/RM-2P-1S1D.csv"]] ## 1R-CRo (RM-2P-1S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -cmpli | 2P | EXTRA3 | d:BF | s:RA | | | RA | | NONE | NONE | NONE | BF | -cmpi | 2P | EXTRA3 | d:BF | s:RA | | | RA | | NONE | NONE | NONE | BF | -"""]] +[[!table format=csv file="openpower/isatables/RM-2P-1S1D.csv"]] ## 1R-CRio (RM-2P-2S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -mtcrf/mtocrf | 2P | EXTRA2 | d:CR | s:RS | s:CR | | RS | NONE | NONE | NONE | WHOLE_REG | WHOLE_REG | -5/0=ftsqrt | 2P | EXTRA2 | TODO | | | | NONE | FRB | NONE | NONE | 0 | 1 | -22/7=mtfsf | 2P | EXTRA2 | TODO | | | | NONE | FRB | NONE | NONE | 0 | 0 | -"""]] +[[!table format=csv file="openpower/isatables/RM-2P-2S1D.csv"]] ## 1R-1W (RM-2P-1S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -neg | 2P | EXTRA3 | d:RT | s:RA | | | RA | NONE | NONE | RT | NONE | NONE | -popcntb | 2P | EXTRA3 | d:RA | s:RS | | | RS | NONE | NONE | RA | NONE | NONE | -prtyw | 2P | EXTRA3 | d:RA | s:RS | | | RS | NONE | NONE | RA | NONE | NONE | -prtyd | 2P | EXTRA3 | d:RA | s:RS | | | RS | NONE | NONE | RA | NONE | NONE | -popcntw | 2P | EXTRA3 | d:RA | s:RS | | | RS | NONE | NONE | RA | NONE | NONE | -popcntd | 2P | EXTRA3 | d:RA | s:RS | | | RS | NONE | NONE | RA | NONE | NONE | -nego | 2P | EXTRA3 | d:RT | s:RA | | | RA | NONE | NONE | RT | NONE | NONE | -"""]] +[[!table format=csv file="openpower/isatables/RM-2P-1S1D.csv"]] ## 1R-1W-imm (RM-2P-1S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -addic | 2P | EXTRA3 | d:RT | s:RA | | | RA | | NONE | RT | NONE | NONE | -addi | 2P | EXTRA3 | d:RT | s:RA | | | RA_OR_ZERO | | NONE | RT | NONE | NONE | -addis | 2P | EXTRA3 | d:RT | s:RA | | | RA_OR_ZERO | | NONE | RT | NONE | NONE | -ori | 2P | EXTRA3 | d:RA | s:RS | | | RS | | NONE | RA | NONE | NONE | -oris | 2P | EXTRA3 | d:RA | s:RS | | | RS | | NONE | RA | NONE | NONE | -xori | 2P | EXTRA3 | d:RA | s:RS | | | RS | | NONE | RA | NONE | NONE | -xoris | 2P | EXTRA3 | d:RA | s:RS | | | RS | | NONE | RA | NONE | NONE | -subfic | 2P | EXTRA3 | d:RT | s:RA | | | RA | | NONE | RT | NONE | NONE | -"""]] +[[!table format=csv file="openpower/isatables/RM-2P-1S1D.csv"]] ## 1R-1W-CRo (RM-2P-1S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -cntlzw | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | RS | NONE | NONE | RA | NONE | CR0 | -cntlzd | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | RS | NONE | NONE | RA | NONE | CR0 | -subfze | 2P | EXTRA3 | d:RT,d:CR0 | s:RA | | | RA | NONE | NONE | RT | NONE | CR0 | -addze | 2P | EXTRA3 | d:RT,d:CR0 | s:RA | | | RA | NONE | NONE | RT | NONE | CR0 | -cnttzw | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | RS | NONE | NONE | RA | NONE | CR0 | -cnttzd | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | RS | NONE | NONE | RA | NONE | CR0 | -subfzeo | 2P | EXTRA3 | d:RT,d:CR0 | s:RA | | | RA | NONE | NONE | RT | NONE | CR0 | -addzeo | 2P | EXTRA3 | d:RT,d:CR0 | s:RA | | | RA | NONE | NONE | RT | NONE | CR0 | -extsh | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | RS | NONE | NONE | RA | NONE | CR0 | -extsb | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | RS | NONE | NONE | RA | NONE | CR0 | -extsw | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | RS | NONE | NONE | RA | NONE | CR0 | -"""]] +[[!table format=csv file="openpower/isatables/RM-2P-1S1D.csv"]] ## 1R-1W-CRo (RM-2P-1S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -addic. | 2P | EXTRA3 | d:RT,d:CR0 | s:RA | | | RA | | NONE | RT | NONE | CR0 | -rlwinm | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | NONE | | RS | RA | NONE | CR0 | -andi. | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | RS | | NONE | RA | NONE | CR0 | -andis. | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | RS | | NONE | RA | NONE | CR0 | -mulli | 2P | EXTRA3 | d:RT,d:CR0 | s:RA | | | RA | | NONE | RT | NONE | CR0 | -rldicl | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | NONE | | RS | RA | NONE | CR0 | -rldicl | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | NONE | | RS | RA | NONE | CR0 | -rldicr | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | NONE | | RS | RA | NONE | CR0 | -rldicr | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | NONE | | RS | RA | NONE | CR0 | -rldic | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | NONE | | RS | RA | NONE | CR0 | -rldic | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | NONE | | RS | RA | NONE | CR0 | -subfme | 2P | EXTRA3 | d:RT,d:CR0 | s:RA | | | RA | | NONE | RT | NONE | CR0 | -addme | 2P | EXTRA3 | d:RT,d:CR0 | s:RA | | | RA | | NONE | RT | NONE | CR0 | -subfmeo | 2P | EXTRA3 | d:RT,d:CR0 | s:RA | | | RA | | NONE | RT | NONE | CR0 | -addmeo | 2P | EXTRA3 | d:RT,d:CR0 | s:RA | | | RA | | NONE | RT | NONE | CR0 | -srawi | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | NONE | | RS | RA | NONE | CR0 | -sradi | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | NONE | | RS | RA | NONE | CR0 | -sradi | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | NONE | | RS | RA | NONE | CR0 | -extswsli | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | NONE | | RS | RA | NONE | CR0 | -extswsli | 2P | EXTRA3 | d:RA,d:CR0 | s:RS | | | NONE | | RS | RA | NONE | CR0 | -"""]] +[[!table format=csv file="openpower/isatables/RM-2P-1S1D.csv"]] ## 1R-1W-CRio (RM-2P-1S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -fcfid[u]s | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -fsqrts | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -fres | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -frsqrtes | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -fsqrt | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -fre | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -frsqrte | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -18/7=mffsfamily | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -1/8=fneg | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -2/8=fmr | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -4/8=fnabs | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -8/8=fabs | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -12/8=frin | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -13/8=friz | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -14/8=frip | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -15/8=frim | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -0/12=frsp | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -0/14=fctiw | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -4/14=fctiwu | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -25/14=fctid | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -26/14=fcfid | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -29/14=fctidu | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -30/14=fcfidu | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -0/15=fctiwz | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -4/15=fctiwuz | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -25/15=fctidz | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -29/15=fctiduz | 2P | EXTRA3 | TODO | | | | NONE | FRB | NONE | FRT | 0 | 0 | -"""]] +[[!table format=csv file="openpower/isatables/RM-2P-1S1D.csv"]] ## 2R-CRo (RM-1P-2S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -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 | -"""]] +[[!table format=csv file="openpower/isatables/RM-1P-2S1D.csv"]] ## 2R-CRio (RM-1P-2S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -0/0=fcmpu | 1P | EXTRA3 | TODO | | | | FRA | FRB | NONE | NONE | 0 | 1 | -1/0=fcmpo | 1P | EXTRA3 | TODO | | | | FRA | FRB | NONE | NONE | 0 | 1 | -4/0=ftdiv | 1P | EXTRA3 | TODO | | | | FRA | FRB | NONE | NONE | 0 | 1 | -"""]] +[[!table format=csv file="openpower/isatables/RM-1P-2S1D.csv"]] ## 2R-1W (RM-1P-2S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -bpermd | 1P | EXTRA3 | d:RA | s:RS | s:RB | | RS | RB | NONE | RA | NONE | NONE | -modud | 1P | EXTRA3 | d:RT | s:RA | s:RB | | RA | RB | NONE | RT | NONE | NONE | -moduw | 1P | EXTRA3 | d:RT | s:RA | s:RB | | RA | RB | NONE | RT | NONE | NONE | -cmpb | 1P | EXTRA3 | d:RA | s:RS | s:RB | | RS | RB | NONE | RA | NONE | NONE | -modsd | 1P | EXTRA3 | d:RT | s:RA | s:RB | | RA | RB | NONE | RT | NONE | NONE | -modsw | 1P | EXTRA3 | d:RT | s:RA | s:RB | | RA | RB | NONE | RT | NONE | NONE | -"""]] +[[!table format=csv file="openpower/isatables/RM-1P-2S1D.csv"]] ## 2R-1W-CRo (RM-1P-2S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -rlwnm | 1P | EXTRA3 | d:RA,d:CR0 | s:RB | s:RS | | NONE | RB | RS | RA | NONE | CR0 | -rldcl | 1P | EXTRA3 | d:RA,d:CR0 | s:RB | s:RS | | NONE | RB | RS | RA | NONE | CR0 | -rldcr | 1P | EXTRA3 | d:RA,d:CR0 | s:RB | s:RS | | NONE | RB | RS | RA | NONE | CR0 | -subfc | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -mulhdu | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -addc | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -mulhwu | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -slw | 1P | EXTRA3 | d:RA,d:CR0 | s:RB | s:RS | | NONE | RB | RS | RA | NONE | CR0 | -sld | 1P | EXTRA3 | d:RA,d:CR0 | s:RB | s:RS | | NONE | RB | RS | RA | NONE | CR0 | -and | 1P | EXTRA3 | d:RA,d:CR0 | s:RB | s:RS | | RS | RB | NONE | RA | NONE | CR0 | -subf | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -andc | 1P | EXTRA3 | d:RA,d:CR0 | s:RB | s:RS | | RS | RB | NONE | RA | NONE | CR0 | -mulhd | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -mulhw | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -nor | 1P | EXTRA3 | d:RA,d:CR0 | s:RB | s:RS | | RS | RB | NONE | RA | NONE | CR0 | -subfe | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -adde | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -mulld | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -mullw | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -add | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -eqv | 1P | EXTRA3 | d:RA,d:CR0 | s:RB | s:RS | | RS | RB | NONE | RA | NONE | CR0 | -xor | 1P | EXTRA3 | d:RA,d:CR0 | s:RB | s:RS | | RS | RB | NONE | RA | NONE | CR0 | -divdeu | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -divweu | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -orc | 1P | EXTRA3 | d:RA,d:CR0 | s:RB | s:RS | | RS | RB | NONE | RA | NONE | CR0 | -divde | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -divwe | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -or | 1P | EXTRA3 | d:RA,d:CR0 | s:RB | s:RS | | RS | RB | NONE | RA | NONE | CR0 | -divdu | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -divwu | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -nand | 1P | EXTRA3 | d:RA,d:CR0 | s:RB | s:RS | | RS | RB | NONE | RA | NONE | CR0 | -divd | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -divw | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -subfco | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -mulhdu | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -addco | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -mulhwu | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -srw | 1P | EXTRA3 | d:RA,d:CR0 | s:RB | s:RS | | NONE | RB | RS | RA | NONE | CR0 | -srd | 1P | EXTRA3 | d:RA,d:CR0 | s:RB | s:RS | | NONE | RB | RS | RA | NONE | CR0 | -subfo | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -mulhd | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -mulhw | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -subfeo | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -addeo | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -mulldo | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -mullwo | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -addo | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -sraw | 1P | EXTRA3 | d:RA,d:CR0 | s:RB | s:RS | | NONE | RB | RS | RA | NONE | CR0 | -srad | 1P | EXTRA3 | d:RA,d:CR0 | s:RB | s:RS | | NONE | RB | RS | RA | NONE | CR0 | -divdeuo | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -divweuo | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -divdeo | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -divweo | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -divduo | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -divwuo | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -divdo | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -divwo | 1P | EXTRA3 | d:RT,d:CR0 | s:RA | s:RB | | RA | RB | NONE | RT | NONE | CR0 | -"""]] +[[!table format=csv file="openpower/isatables/RM-1P-2S1D.csv"]] ## 2R-1W-CRo (RM-1P-2S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -rlwimi | 1P | EXTRA3 | d:RA,d:CR0 | s:RA | s:RS | | RA | | RS | RA | NONE | CR0 | -rldimi | 1P | EXTRA3 | d:RA,d:CR0 | s:RA | s:RS | | RA | | RS | RA | NONE | CR0 | -rldimi | 1P | EXTRA3 | d:RA,d:CR0 | s:RA | s:RS | | RA | | RS | RA | NONE | CR0 | -"""]] +[[!table format=csv file="openpower/isatables/RM-1P-2S1D.csv"]] ## 2R-1W-CRi (RM-1P-3S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -isel | 1P | EXTRA2 | d:RT | s:RA | s:RB | s:BC | RA_OR_ZERO | RB | NONE | RT | BC | NONE | -"""]] +[[!table format=csv file="openpower/isatables/RM-1P-3S1D.csv"]] ## 2R-1W-CRio (RM-1P-2S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -fdivs | 1P | EXTRA3 | TODO | | | | FRA | FRB | NONE | FRT | 0 | 0 | -fsubs | 1P | EXTRA3 | TODO | | | | FRA | FRB | NONE | FRT | 0 | 0 | -fadds | 1P | EXTRA3 | TODO | | | | FRA | FRB | NONE | FRT | 0 | 0 | -fmuls | 1P | EXTRA3 | TODO | | | | FRA | NONE | FRC | FRT | 0 | 0 | -fdiv | 1P | EXTRA3 | TODO | | | | FRA | FRB | NONE | FRT | 0 | 0 | -fsub | 1P | EXTRA3 | TODO | | | | FRA | FRB | NONE | FRT | 0 | 0 | -fadd | 1P | EXTRA3 | TODO | | | | FRA | FRB | NONE | FRT | 0 | 0 | -fmul | 1P | EXTRA3 | TODO | | | | FRA | NONE | FRC | FRT | 0 | 0 | -26/6=fmrgow | 1P | EXTRA3 | TODO | | | | FRA | FRB | NONE | FRT | 0 | 0 | -30/6=fmrgew | 1P | EXTRA3 | TODO | | | | FRA | FRB | NONE | FRT | 0 | 0 | -0/8=fcpsgn | 1P | EXTRA3 | TODO | | | | FRA | FRB | NONE | FRT | 0 | 0 | -"""]] +[[!table format=csv file="openpower/isatables/RM-1P-2S1D.csv"]] ## 3R-1W-CRio (RM-1P-3S1D) -[[!table data=""" -insn | Ptype | Etype | 0 | 1 | 2 | 3 | in1 | in2 | in3 | out | CR in | CR out | -fmsubs | 1P | EXTRA2 | d:FRT,d:CR1 | s:FRA | s:FRB | s:FRC | FRA | FRB | FRC | FRT | 0 | 0 | -fmadds | 1P | EXTRA2 | d:FRT,d:CR1 | s:FRA | s:FRB | s:FRC | FRA | FRB | FRC | FRT | 0 | 0 | -fnmsubs | 1P | EXTRA2 | d:FRT,d:CR1 | s:FRA | s:FRB | s:FRC | FRA | FRB | FRC | FRT | 0 | 0 | -fnmadds | 1P | EXTRA2 | d:FRT,d:CR1 | s:FRA | s:FRB | s:FRC | FRA | FRB | FRC | FRT | 0 | 0 | -fsel | 1P | EXTRA2 | d:FRT,d:CR1 | s:FRA | s:FRB | s:FRC | FRA | FRB | FRC | FRT | 0 | 0 | -fmsub | 1P | EXTRA2 | d:FRT,d:CR1 | s:FRA | s:FRB | s:FRC | FRA | FRB | FRC | FRT | 0 | 0 | -fmadd | 1P | EXTRA2 | d:FRT,d:CR1 | s:FRA | s:FRB | s:FRC | FRA | FRB | FRC | FRT | 0 | 0 | -fnmsub | 1P | EXTRA2 | d:FRT,d:CR1 | s:FRA | s:FRB | s:FRC | FRA | FRB | FRC | FRT | 0 | 0 | -fnmadd | 1P | EXTRA2 | d:FRT,d:CR1 | s:FRA | s:FRB | s:FRC | FRA | FRB | FRC | FRT | 0 | 0 | -"""]] +[[!table format=csv file="openpower/isatables/RM-1P-3S1D.csv"]] diff --git a/openpower/sv_analysis.py b/openpower/sv_analysis.py index ef03913ae..4aece594f 100644 --- a/openpower/sv_analysis.py +++ b/openpower/sv_analysis.py @@ -36,7 +36,7 @@ def get_csv(name): def write_csv(name, items, headers): file_path = find_wiki_file(name) with open(file_path, 'w') as csvfile: - writer = csv.DictWriter(csvfile, fieldnames) + writer = csv.DictWriter(csvfile, headers) writer.writeheader() writer.writerows(items) @@ -188,7 +188,8 @@ def process_csvs(): continue if 'sprs' in fname: continue - + if 'RM' in fname: + continue #print (fname) csvname = os.path.split(fname)[1] # csvname is something like: minor_59.csv, fname the whole path @@ -324,8 +325,10 @@ def process_csvs(): # print out svp64 tables by category print ("## %s (%s)" % (name, value)) print ('') - print ('[[!table data="""') - print (tformat(csvcols)) + print ('[[!table format=csv file="openpower/isatables/%s.csv"]]' % \ + value) + print ('') + rows = bykey[key] rows.sort() @@ -345,7 +348,7 @@ def process_csvs(): # go through each register matching to Rxxxx_EXTRAx for k in ['0', '1', '2', '3']: res[k] = '' - + # temporary useful info regs = [] for k in ['in1', 'in2', 'in3', 'out', 'CR in', 'CR out']: @@ -361,7 +364,6 @@ def process_csvs(): else: regs.append('') - # sigh now the fun begins. this isn't the sanest way to do it # but the patterns are pretty regular. if value == 'LDSTRM-2P-1S1D': @@ -497,14 +499,16 @@ def process_csvs(): res['2'] = 's:FRB' # FRB: Rsrc2_EXTRA2 res['3'] = 's:FRC' # FRC: Rsrc3_EXTRA2 - - # print out the row - print (tformat(res.values())) # add to svp64 csvs - svp64[value].append(res) - - print ('"""]]') - print ('') + for k in ['in1', 'in2', 'in3', 'out', 'CR in', 'CR out']: + del res[k] + #if res['0'] != 'TODO': + # svp64[value].append(res) + + # now write out the csv files + for value, csv in svp64.items(): + csvcols = ['insn', 'Ptype', 'Etype', '0', '1', '2', '3'] + write_csv("%s.csv" % value, csv, csvcols) if __name__ == '__main__': process_csvs()