From 21b95286c527378ff38bf347ea908f02ea30eaeb Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 26 Nov 2020 21:04:16 +0000 Subject: [PATCH] update opcode_regs_deduped to include immediates and old mapping --- openpower/opcode_regs_deduped.mdwn | 342 ++++++++++++++++++++++------- 1 file changed, 259 insertions(+), 83 deletions(-) diff --git a/openpower/opcode_regs_deduped.mdwn b/openpower/opcode_regs_deduped.mdwn index f01e8cae8..e3665a109 100644 --- a/openpower/opcode_regs_deduped.mdwn +++ b/openpower/opcode_regs_deduped.mdwn @@ -1,37 +1,113 @@ +# map to old SV Prefix + +[[!table data=""" +LDST-1R-1W-imm | - | +LDST-1R-1W-imm | - | +LDST-1R-2W-imm | - | +LDST-1R-2W-imm | - | +LDST-2R-imm | - | +LDST-2R-imm | - | +LDST-2R-1W-imm | - | +LDST-2R-1W-imm | - | +LDST-2R-1W-imm | - | +LDST-2R-2W-imm | - | +LDST-3R-imm | - | +LDST-3R-CRo | - | +LDST-3R-1W-imm | - | +imm | - | +imm | - | +CRi | - | +CRi | - | +CRio | - | +1W-imm | - | +1W-CRi | - | +1R-imm | - | +1R-imm | - | +1R-CRo | - | +1R-CRo | - | +1R-CRio | - | +1R-1W-imm | - | +1R-1W-imm | - | +1R-1W-imm | - | +1R-1W-CRo | R | +1R-1W-CRo | R | +1R-1W-CRo | R | +1R-1W-CRo | R | +1R-1W-CRo | R | +1R-1W-CRo | R | +1R-1W-CRio | R | +2R-imm | - | +2R-CRo | R | +2R-CRio | R | +2R-1W-imm | - | +2R-1W-CRo | R | +2R-1W-CRo | R | +2R-1W-CRo | R | +2R-1W-CRi | R | +2R-1W-CRio | R | +3R-1W-CRio | FR4 | +"""]] + # keys [[!table data=""" -unit | in | outcnt | CR in | CR out| name | -LDST | 1 | 1 | 0 | 0| LDST-1R-1W | -LDST | 1 | 2 | 0 | 0| LDST-1R-2W | -LDST | 2 | 0 | 0 | 0| LDST-2R | -LDST | 2 | 1 | 0 | 0| LDST-2R-1W | -LDST | 2 | 2 | 0 | 0| LDST-2R-2W | -LDST | 3 | 0 | 0 | 0| LDST-3R | -LDST | 3 | 0 | 0 | 1| LDST-3R-CRo | -LDST | 3 | 1 | 0 | 0| LDST-3R-1W | -OTHER | 0 | 0 | 0 | 0| | -OTHER | 0 | 0 | 1 | 0| CRi | -OTHER | 0 | 0 | 1 | 1| CRio | -OTHER | 0 | 1 | 0 | 0| 1W | -OTHER | 0 | 1 | 1 | 0| 1W-CRi | -OTHER | 1 | 0 | 0 | 0| 1R | -OTHER | 1 | 0 | 0 | 1| 1R-CRo | -OTHER | 1 | 0 | 1 | 1| 1R-CRio | -OTHER | 1 | 1 | 0 | 0| 1R-1W | -OTHER | 1 | 1 | 0 | 1| 1R-1W-CRo | -OTHER | 1 | 1 | 1 | 1| 1R-1W-CRio | -OTHER | 2 | 0 | 0 | 0| 2R | -OTHER | 2 | 0 | 0 | 1| 2R-CRo | -OTHER | 2 | 0 | 1 | 1| 2R-CRio | -OTHER | 2 | 1 | 0 | 0| 2R-1W | -OTHER | 2 | 1 | 0 | 1| 2R-1W-CRo | -OTHER | 2 | 1 | 1 | 0| 2R-1W-CRi | -OTHER | 2 | 1 | 1 | 1| 2R-1W-CRio | -OTHER | 3 | 1 | 1 | 1| 3R-1W-CRio | -"""]] - -## LDST-1R-1W +unit | in | outcnt | CR in | CR out | imm| name | +LDST | 1 | 1 | 0 | 0 | DS| LDST-1R-1W-imm | +LDST | 1 | 1 | 0 | 0 | SI| LDST-1R-1W-imm | +LDST | 1 | 2 | 0 | 0 | DS| LDST-1R-2W-imm | +LDST | 1 | 2 | 0 | 0 | SI| LDST-1R-2W-imm | +LDST | 2 | 0 | 0 | 0 | DS| LDST-2R-imm | +LDST | 2 | 0 | 0 | 0 | SI| LDST-2R-imm | +LDST | 2 | 1 | 0 | 0 | | LDST-2R-1W-imm | +LDST | 2 | 1 | 0 | 0 | DS| LDST-2R-1W-imm | +LDST | 2 | 1 | 0 | 0 | SI| LDST-2R-1W-imm | +LDST | 2 | 2 | 0 | 0 | | LDST-2R-2W-imm | +LDST | 3 | 0 | 0 | 0 | | LDST-3R-imm | +LDST | 3 | 0 | 0 | 1 | | LDST-3R-CRo | +LDST | 3 | 1 | 0 | 0 | | LDST-3R-1W-imm | +OTHER | 0 | 0 | 0 | 0 | | imm | +OTHER | 0 | 0 | 0 | 0 | LI| imm | +OTHER | 0 | 0 | 1 | 0 | | CRi | +OTHER | 0 | 0 | 1 | 0 | BD| CRi | +OTHER | 0 | 0 | 1 | 1 | | CRio | +OTHER | 0 | 1 | 0 | 0 | | 1W-imm | +OTHER | 0 | 1 | 1 | 0 | | 1W-CRi | +OTHER | 1 | 0 | 0 | 0 | | 1R-imm | +OTHER | 1 | 0 | 0 | 0 | SI| 1R-imm | +OTHER | 1 | 0 | 0 | 1 | SI| 1R-CRo | +OTHER | 1 | 0 | 0 | 1 | UI| 1R-CRo | +OTHER | 1 | 0 | 1 | 1 | | 1R-CRio | +OTHER | 1 | 1 | 0 | 0 | | 1R-1W-imm | +OTHER | 1 | 1 | 0 | 0 | SI| 1R-1W-imm | +OTHER | 1 | 1 | 0 | 0 | UI| 1R-1W-imm | +OTHER | 1 | 1 | 0 | 1 | | 1R-1W-CRo | +OTHER | 1 | 1 | 0 | 1 | M1| 1R-1W-CRo | +OTHER | 1 | 1 | 0 | 1 | SH| 1R-1W-CRo | +OTHER | 1 | 1 | 0 | 1 | SH32| 1R-1W-CRo | +OTHER | 1 | 1 | 0 | 1 | SI| 1R-1W-CRo | +OTHER | 1 | 1 | 0 | 1 | UI| 1R-1W-CRo | +OTHER | 1 | 1 | 1 | 1 | | 1R-1W-CRio | +OTHER | 2 | 0 | 0 | 0 | | 2R-imm | +OTHER | 2 | 0 | 0 | 1 | | 2R-CRo | +OTHER | 2 | 0 | 1 | 1 | | 2R-CRio | +OTHER | 2 | 1 | 0 | 0 | | 2R-1W-imm | +OTHER | 2 | 1 | 0 | 1 | | 2R-1W-CRo | +OTHER | 2 | 1 | 0 | 1 | SH| 2R-1W-CRo | +OTHER | 2 | 1 | 0 | 1 | SH32| 2R-1W-CRo | +OTHER | 2 | 1 | 1 | 0 | | 2R-1W-CRi | +OTHER | 2 | 1 | 1 | 1 | | 2R-1W-CRio | +OTHER | 3 | 1 | 1 | 1 | | 3R-1W-CRio | +"""]] + +## LDST-1R-1W-imm + +[[!table data=""" +CSV | opcode | asm | form| +minor_58.csv | 0 | ld | DS-Form| +minor_58.csv | 2 | lwa | DS-Form| +"""]] + +## LDST-1R-1W-imm [[!table data=""" CSV | opcode | asm | form| @@ -39,11 +115,16 @@ major.csv | 32 | lwz | D-Form| major.csv | 34 | lbz | D-Form| major.csv | 40 | lhz | D-Form| major.csv | 42 | lha | D-Form| -minor_58.csv | 0 | ld | DS-Form| -minor_58.csv | 2 | lwa | DS-Form| """]] -## LDST-1R-2W +## LDST-1R-2W-imm + +[[!table data=""" +CSV | opcode | asm | form| +minor_58.csv | 1 | ldu | DS-Form| +"""]] + +## LDST-1R-2W-imm [[!table data=""" CSV | opcode | asm | form| @@ -51,26 +132,28 @@ major.csv | 33 | lwzu | D-Form| major.csv | 35 | lbzu | D-Form| major.csv | 41 | lhzu | D-Form| major.csv | 43 | lhau | D-Form| -minor_58.csv | 1 | ldu | DS-Form| """]] -## LDST-2R +## LDST-2R-imm + +[[!table data=""" +CSV | opcode | asm | form| +minor_62.csv | 0 | std | DS-Form| +"""]] + +## LDST-2R-imm [[!table data=""" CSV | opcode | asm | form| major.csv | 36 | stw | D-Form| major.csv | 38 | stb | D-Form| major.csv | 44 | sth | D-Form| -minor_62.csv | 0 | std | DS-Form| """]] -## LDST-2R-1W +## LDST-2R-1W-imm [[!table data=""" CSV | opcode | asm | form| -major.csv | 37 | stwu | D-Form| -major.csv | 39 | stbu | D-Form| -major.csv | 45 | sthu | D-Form| minor_31.csv | 0b0000010100 | lwarx | X-Form| minor_31.csv | 0b0000010101 | ldx | X-Form| minor_31.csv | 0b0000010111 | lwzx | X-Form| @@ -88,10 +171,25 @@ minor_31.csv | 0b1100010110 | lhbrx | X-Form| minor_31.csv | 0b1100110101 | lhzcix | X-Form| minor_31.csv | 0b1101010101 | lbzcix | X-Form| minor_31.csv | 0b1101110101 | ldcix | X-Form| +"""]] + +## LDST-2R-1W-imm + +[[!table data=""" +CSV | opcode | asm | form| minor_62.csv | 1 | stdu | DS-Form| """]] -## LDST-2R-2W +## LDST-2R-1W-imm + +[[!table data=""" +CSV | opcode | asm | form| +major.csv | 37 | stwu | D-Form| +major.csv | 39 | stbu | D-Form| +major.csv | 45 | sthu | D-Form| +"""]] + +## LDST-2R-2W-imm [[!table data=""" CSV | opcode | asm | form| @@ -103,7 +201,7 @@ minor_31.csv | 0b0101110101 | lwaux | X-Form| minor_31.csv | 0b0101110111 | lhaux | X-Form| """]] -## LDST-3R +## LDST-3R-imm [[!table data=""" CSV | opcode | asm | form| @@ -130,7 +228,7 @@ minor_31.csv | 0b0011010111 | stbx | X-Form| minor_31.csv | 0b1010110110 | stbcx | X-Form| """]] -## LDST-3R-1W +## LDST-3R-1W-imm [[!table data=""" CSV | opcode | asm | form| @@ -140,14 +238,13 @@ minor_31.csv | 0b0011110111 | stbux | X-Form| minor_31.csv | 0b0110110111 | sthux | X-Form| """]] -## +## imm [[!table data=""" CSV | opcode | asm | form| extra.csv | 000000---------------0100000000- | attn | NONE-Form| extra.csv | 01100000000000000000000000000000 | nop | D-Form| major.csv | 17 | sc | SC-Form| -major.csv | 18 | b | I-Form| minor_19.csv | 0b0000010010 | rfid | XL-Form| minor_19.csv | 0b0010010110 | isync | XL-Form| minor_19.csv | 0b0100010010 | hrfid | XL-Form| @@ -162,16 +259,29 @@ minor_31.csv | 0b1001010110 | sync | X-Form| minor_31.csv | 0b1111010110 | icbi | X-Form| """]] +## imm + +[[!table data=""" +CSV | opcode | asm | form| +major.csv | 18 | b | I-Form| +"""]] + ## CRi [[!table data=""" CSV | opcode | asm | form| -major.csv | 16 | bc | B-Form| minor_19.csv | 0b0000010000 | bclr | XL-Form| minor_19.csv | 0b1000010000 | bcctr | XL-Form| minor_19.csv | 0b1000110000 | bctar | XL-Form| """]] +## CRi + +[[!table data=""" +CSV | opcode | asm | form| +major.csv | 16 | bc | B-Form| +"""]] + ## CRio [[!table data=""" @@ -193,7 +303,7 @@ minor_63l.csv | 0b011000010 | 2/6=mtfsb0 | -Form| minor_63l.csv | 0b011000100 | 4/6=mtfsfi | -Form| """]] -## 1W +## 1W-imm [[!table data=""" CSV | opcode | asm | form| @@ -210,12 +320,10 @@ minor_31.csv | 0b0000010011 | mfcr/mfocrf | XFX-Form| minor_31.csv | 0b0010000000 | setb | VX-Form| """]] -## 1R +## 1R-imm [[!table data=""" CSV | opcode | asm | form| -major.csv | 2 | tdi | D-Form| -major.csv | 3 | twi | D-Form| minor_31.csv | 0b0010010010 | mtmsr | X-Form| minor_31.csv | 0b0010110010 | mtmsrd | X-Form| minor_31.csv | 0b0100010010 | tlbiel | X-Form| @@ -223,14 +331,28 @@ minor_31.csv | 0b0100110010 | tlbie | X-Form| minor_31.csv | 0b0111010011 | mtspr | XFX-Form| """]] +## 1R-imm + +[[!table data=""" +CSV | opcode | asm | form| +major.csv | 2 | tdi | D-Form| +major.csv | 3 | twi | D-Form| +"""]] + ## 1R-CRo [[!table data=""" CSV | opcode | asm | form| -major.csv | 10 | cmpli | D-Form| major.csv | 11 | cmpi | D-Form| """]] +## 1R-CRo + +[[!table data=""" +CSV | opcode | asm | form| +major.csv | 10 | cmpli | D-Form| +"""]] + ## 1R-CRio [[!table data=""" @@ -241,18 +363,10 @@ minor_63l.csv | 0b000000101 | 5/0=ftsqrt | -Form| minor_63l.csv | 0b011110110 | 22/7=mtfsf | -Form| """]] -## 1R-1W +## 1R-1W-imm [[!table data=""" CSV | opcode | asm | form| -major.csv | 12 | addic | D-Form| -major.csv | 14 | addi | D-Form| -major.csv | 15 | addis | D-Form| -major.csv | 24 | ori | D-Form| -major.csv | 25 | oris | D-Form| -major.csv | 26 | xori | D-Form| -major.csv | 27 | xoris | D-Form| -major.csv | 8 | subfic | D-Form| minor_31.csv | 0b0001101000 | neg | XO-Form| minor_31.csv | 0b0001111010 | popcntb | X-Form| minor_31.csv | 0b0010011010 | prtyw | X-Form| @@ -262,41 +376,91 @@ minor_31.csv | 0b0111111010 | popcntd | X-Form| minor_31.csv | 0b1001101000 | nego | XO-Form| """]] +## 1R-1W-imm + +[[!table data=""" +CSV | opcode | asm | form| +major.csv | 12 | addic | D-Form| +major.csv | 14 | addi | D-Form| +major.csv | 15 | addis | D-Form| +major.csv | 8 | subfic | D-Form| +"""]] + +## 1R-1W-imm + +[[!table data=""" +CSV | opcode | asm | form| +major.csv | 24 | ori | D-Form| +major.csv | 25 | oris | D-Form| +major.csv | 26 | xori | D-Form| +major.csv | 27 | xoris | D-Form| +"""]] + ## 1R-1W-CRo [[!table data=""" CSV | opcode | asm | form| -major.csv | 13 | addic. | D-Form| -major.csv | 21 | rlwinm | M-Form| -major.csv | 28 | andi. | B-Form| -major.csv | 29 | andis. | B-Form| -major.csv | 7 | mulli | D-Form| -minor_30.csv | 0b0000 | rldicl | MDS-Form| -minor_30.csv | 0b0001 | rldicl | MDS-Form| -minor_30.csv | 0b0010 | rldicr | MD-Form| -minor_30.csv | 0b0011 | rldicr | MD-Form| -minor_30.csv | 0b0100 | rldic | MD-Form| -minor_30.csv | 0b0101 | rldic | MD-Form| minor_31.csv | 0b0000011010 | cntlzw | X-Form| minor_31.csv | 0b0000111010 | cntlzd | X-Form| minor_31.csv | 0b0011001000 | subfze | XO-Form| minor_31.csv | 0b0011001010 | addze | XO-Form| -minor_31.csv | 0b0011101000 | subfme | XO-Form| -minor_31.csv | 0b0011101010 | addme | XO-Form| minor_31.csv | 0b1000011010 | cnttzw | X-Form| minor_31.csv | 0b1000111010 | cnttzd | X-Form| minor_31.csv | 0b1011001000 | subfzeo | XO-Form| minor_31.csv | 0b1011001010 | addzeo | XO-Form| +minor_31.csv | 0b1110011010 | extsh | X-Form| +minor_31.csv | 0b1110111010 | extsb | X-Form| +minor_31.csv | 0b1111011010 | extsw | X-Form| +"""]] + +## 1R-1W-CRo + +[[!table data=""" +CSV | opcode | asm | form| +minor_31.csv | 0b0011101000 | subfme | XO-Form| +minor_31.csv | 0b0011101010 | addme | XO-Form| minor_31.csv | 0b1011101000 | subfmeo | XO-Form| minor_31.csv | 0b1011101010 | addmeo | XO-Form| -minor_31.csv | 0b1100111000 | srawi | X-Form| +"""]] + +## 1R-1W-CRo + +[[!table data=""" +CSV | opcode | asm | form| +minor_30.csv | 0b0000 | rldicl | MDS-Form| +minor_30.csv | 0b0001 | rldicl | MDS-Form| +minor_30.csv | 0b0010 | rldicr | MD-Form| +minor_30.csv | 0b0011 | rldicr | MD-Form| +minor_30.csv | 0b0100 | rldic | MD-Form| +minor_30.csv | 0b0101 | rldic | MD-Form| minor_31.csv | 0b1100111010 | sradi | XS-Form| minor_31.csv | 0b1100111011 | sradi | XS-Form| minor_31.csv | 0b1101111010 | extswsli | XS-Form| minor_31.csv | 0b1101111011 | extswsli | XS-Form| -minor_31.csv | 0b1110011010 | extsh | X-Form| -minor_31.csv | 0b1110111010 | extsb | X-Form| -minor_31.csv | 0b1111011010 | extsw | X-Form| +"""]] + +## 1R-1W-CRo + +[[!table data=""" +CSV | opcode | asm | form| +major.csv | 21 | rlwinm | M-Form| +minor_31.csv | 0b1100111000 | srawi | X-Form| +"""]] + +## 1R-1W-CRo + +[[!table data=""" +CSV | opcode | asm | form| +major.csv | 13 | addic. | D-Form| +major.csv | 7 | mulli | D-Form| +"""]] + +## 1R-1W-CRo + +[[!table data=""" +CSV | opcode | asm | form| +major.csv | 28 | andi. | B-Form| +major.csv | 29 | andis. | B-Form| """]] ## 1R-1W-CRio @@ -332,7 +496,7 @@ minor_63l.csv | 0b111111001 | 25/15=fctidz | -Form| minor_63l.csv | 0b111111101 | 29/15=fctiduz | -Form| """]] -## 2R +## 2R-imm [[!table data=""" CSV | opcode | asm | form| @@ -360,7 +524,7 @@ minor_63l.csv | 0b000000001 | 1/0=fcmpo | -Form| minor_63l.csv | 0b000000100 | 4/0=ftdiv | -Form| """]] -## 2R-1W +## 2R-1W-imm [[!table data=""" CSV | opcode | asm | form| @@ -376,10 +540,7 @@ minor_31.csv | 0b1100001011 | modsw | X-Form| [[!table data=""" CSV | opcode | asm | form| -major.csv | 20 | rlwimi | M-Form| major.csv | 23 | rlwnm | M-Form| -minor_30.csv | 0b0110 | rldimi | MD-Form| -minor_30.csv | 0b0111 | rldimi | MD-Form| minor_30.csv | 0b1000 | rldcl | MD-Form| minor_30.csv | 0b1001 | rldcr | MD-Form| minor_31.csv | 0b0000001000 | subfc | XO-Form| @@ -438,6 +599,21 @@ minor_31.csv | 0b1111101001 | divdo | XO-Form| minor_31.csv | 0b1111101011 | divwo | XO-Form| """]] +## 2R-1W-CRo + +[[!table data=""" +CSV | opcode | asm | form| +minor_30.csv | 0b0110 | rldimi | MD-Form| +minor_30.csv | 0b0111 | rldimi | MD-Form| +"""]] + +## 2R-1W-CRo + +[[!table data=""" +CSV | opcode | asm | form| +major.csv | 20 | rlwimi | M-Form| +"""]] + ## 2R-1W-CRi [[!table data=""" -- 2.30.2