From: Luke Kenneth Casson Leighton Date: Sun, 4 Aug 2019 06:36:36 +0000 (+0100) Subject: update split out funct5 into separate tables X-Git-Tag: convert-csv-opcode-to-binary~4294 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a9cdce5aeeb3d2f74e1a63efd2e44e80e1c4d470;p=libreriscv.git update split out funct5 into separate tables --- diff --git a/rv_major_opcode_1010011.mdwn b/rv_major_opcode_1010011.mdwn index b1b19fe33..55db98392 100644 --- a/rv_major_opcode_1010011.mdwn +++ b/rv_major_opcode_1010011.mdwn @@ -1,71 +1,173 @@ +# Main FP opcode 1010011 table [[!table data=""" 31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function | funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | | 5 | 2 | 5 | 5 | 3 | 5 | 7 | | +------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | 00000 | xx | rs2 | rs1 | rm | rd | 1010011 | FADD.xx | 00001 | xx | rs2 | rs1 | rm | rd | 1010011 | FSUB.xx | 00010 | xx | rs2 | rs1 | rm | rd | 1010011 | FMUL.xx | 00011 | xx | rs2 | rs1 | rm | rd | 1010011 | FDIV.xx | ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | -00100 | xx | rs2 | rs1 | 000 | rd | 1010011 | FSGNJ.xx | -00100 | xx | rs2 | rs1 | 001 | rd | 1010011 | FSGNJN.xx | -00100 | xx | rs2 | rs1 | 010 | rd | 1010011 | FSGNJX.xx | -00100 | xx | rs2 | rs1 | 011 | rd | 1010011 | f3? | -00100 | xx | rs2 | rs1 | 100 | rd | 1010011 | f3? | -00100 | xx | rs2 | rs1 | 101 | rd | 1010011 | f3? | -00100 | xx | rs2 | rs1 | 110 | rd | 1010011 | f3? | -00100 | xx | rs2 | rs1 | 111 | rd | 1010011 | f3? | ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | -00101 | xx | rs2 | rs1 | 000 | rd | 1010011 | FMIN.S | -00101 | xx | rs2 | rs1 | 001 | rd | 1010011 | FMAX.S | -00101 | xx | rs2 | rs1 | 010 | rd | 1010011 | f3? | -00101 | xx | rs2 | rs1 | 011 | rd | 1010011 | f3? | -00101 | xx | rs2 | rs1 | 100 | rd | 1010011 | f3? | -00101 | xx | rs2 | rs1 | 101 | rd | 1010011 | f3? | -00101 | xx | rs2 | rs1 | 110 | rd | 1010011 | f3? | -00101 | xx | rs2 | rs1 | 111 | rd | 1010011 | f3? | ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | +00100 | xx | rs2 | rs1 | yyy | rd | 1010011 | tb=00100 | +00101 | xx | rs2 | rs1 | yyy | rd | 1010011 | tb=00101 | 00110 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | 00111 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | 01000 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | 01001 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | 01010 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | -01011 | xx | rs2!=0 | rs1 | yyy | rd | 1010011 | ? | +01011 | xx | xxxxx | rs1 | yyy | rd | 1010011 | tb=01011 | +01100 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | +01101 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | +01110 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | +01111 | xx | xxxxx | rs1 | yyy | rd | 1010011 | tb=01111 | +10000 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | +10001 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | +10010 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | +10011 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | +10100 | xx | rs2 | rs1 | yyy | rd | 1010011 | tb=10100 | +10101 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | +10110 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | +10111 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | +11000 | xx | xxxxx | rs1 | yyy | rd | 1010011 | tb=11000 | +11001 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | +11010 | xx | xxxxx | rs1 | yyy | rd | 1010011 | tb=11010 | +11100 | xx | xxxxx | rs1 | 000 | rd | 1010011 | tb=11100 | +11101 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | +11110 | xx | xxxxx | rs1 | 000 | rd | 1010011 | tb=11110 | +11111 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | +"""]] + +## funct5 = 00100 + +[[!table data=""" +31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function | +funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | | + 5 | 2 | 5 | 5 | 3 | 5 | 7 | | +------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | +00100 | xx | rs2 | rs1 | 000 | rd | 1010011 | FSGNJ.xx | +00100 | xx | rs2 | rs1 | 001 | rd | 1010011 | FSGNJN.xx | +00100 | xx | rs2 | rs1 | 010 | rd | 1010011 | FSGNJX.xx | +00100 | xx | rs2 | rs1 | 011 | rd | 1010011 | ?f3=011 | +00100 | xx | rs2 | rs1 | 100 | rd | 1010011 | ?f3=100 | +00100 | xx | rs2 | rs1 | 101 | rd | 1010011 | ?f3=101 | +00100 | xx | rs2 | rs1 | 110 | rd | 1010011 | ?f3=110 | +00100 | xx | rs2 | rs1 | 111 | rd | 1010011 | ?f3=111 | +"""]] + +# funct5 = 00101 + +[[!table data=""" +31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function | +funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | | + 5 | 2 | 5 | 5 | 3 | 5 | 7 | | +------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | +00101 | xx | rs2 | rs1 | 000 | rd | 1010011 | FMIN.S | +00101 | xx | rs2 | rs1 | 001 | rd | 1010011 | FMAX.S | +00101 | xx | rs2 | rs1 | 010 | rd | 1010011 | ?f3=010 | +00101 | xx | rs2 | rs1 | 011 | rd | 1010011 | ?f3=011 | +00101 | xx | rs2 | rs1 | 100 | rd | 1010011 | ?f3=100 | +00101 | xx | rs2 | rs1 | 101 | rd | 1010011 | ?f3=101 | +00101 | xx | rs2 | rs1 | 110 | rd | 1010011 | ?f3=110 | +00101 | xx | rs2 | rs1 | 111 | rd | 1010011 | ?f3=111 | +"""]] + +# funct5 = 01011 + +[[!table data=""" +31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function | +funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | | + 5 | 2 | 5 | 5 | 3 | 5 | 7 | | +------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | 01011 | xx | 00000 | rs1 | yyy | rd | 1010011 | FSQRT.xx | -01100 | xx | rs2 | rs1 | yyy | rd | 1010011 | | -01101 | xx | rs2 | rs1 | yyy | rd | 1010011 | | -01110 | xx | rs2 | rs1 | yyy | rd | 1010011 | | -01111 | xx | rs2!=0 | rs1 | yyy | rd | 1010011 | ? | +01011 | xx | rs2!=0 | rs1 | yyy | rd | 1010011 | ?rs2 | +"""]] + +# funct5 = 01111 + +[[!table data=""" +31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function | +funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | | + 5 | 2 | 5 | 5 | 3 | 5 | 7 | | +------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | 01111 | xx | 00000 | rs1 | yyy | rd | 1010011 | FRSQRT.xx | -10000 | xx | rs2 | rs1 | yyy | rd | 1010011 | | -10001 | xx | rs2 | rs1 | yyy | rd | 1010011 | | -10010 | xx | rs2 | rs1 | yyy | rd | 1010011 | | -10011 | xx | rs2 | rs1 | yyy | rd | 1010011 | | -10100 | xx | rs2 | rs1 | yyy | rd | 1010011 | | -10101 | xx | rs2 | rs1 | yyy | rd | 1010011 | | -10110 | xx | rs2 | rs1 | yyy | rd | 1010011 | | -10111 | xx | rs2 | rs1 | yyy | rd | 1010011 | | ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | -11000 | xx | 00000 | rs1 | yyy | rd | 1010011 | FCVT.W.xx | -11000 | xx | 00001 | rs1 | yyy | rd | 1010011 | FCVT.WU.xx | -11000 | xx | 00010 | rs1 | yyy | rd | 1010011 | | -11000 | xx | 00011 | rs1 | yyy | rd | 1010011 | | -11000 | xx | xxxxx | rs1 | yyy | rd | 1010011 | rs2? | ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | -11001 | xx | rs2 | rs1 | yyy | rd | 1010011 | | ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | -11010 | xx | 00000 | rs1 | yyy | rd | 1010011 | | -11010 | xx | 00001 | rs1 | yyy | rd | 1010011 | | -11010 | xx | 00010 | rs1 | yyy | rd | 1010011 | | -11010 | xx | 00011 | rs1 | yyy | rd | 1010011 | FCVT.xx.LU | -11011 | xx | xxxxx | rs1 | yyy | rd | 1010011 | | ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | -11100 | xx | 00000 | rs1 | yyy | rd | 1010011 | FCLASS.xx | -11100 | xx | xxxxx | rs1 | yyy | rd | 1010011 | rs2? | ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | -11101 | xx | rs2 | rs1 | yyy | rd | 1010011 | | -11110 | xx | rs2 | rs1 | yyy | rd | 1010011 | | -11111 | xx | rs2 | rs1 | yyy | rd | 1010011 | | +01111 | xx | rs2!=0 | rs1 | yyy | rd | 1010011 | ?rs2 | +"""]] + +# funct5 = 10100 + +[[!table data=""" +31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function | +funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | | + 5 | 2 | 5 | 5 | 3 | 5 | 7 | | +------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | +10100 | xx | rs2 | rs1 | 000 | rd | 1010011 | FLE.xx | +10100 | xx | rs2 | rs1 | 001 | rd | 1010011 | FLT.xx | +10100 | xx | rs2 | rs1 | 010 | rd | 1010011 | FEQ.xx | +10100 | xx | rs2 | rs1 | 011 | rd | 1010011 | ?f3=011 | +10100 | xx | rs2 | rs1 | 100 | rd | 1010011 | ?f3=100 | +10100 | xx | rs2 | rs1 | 101 | rd | 1010011 | ?f3=101 | +10100 | xx | rs2 | rs1 | 110 | rd | 1010011 | ?f3=110 | +10100 | xx | rs2 | rs1 | 111 | rd | 1010011 | ?f3=111 | +"""]] + +# funct5 = 11000 + +[[!table data=""" +31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function | +funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | | + 5 | 2 | 5 | 5 | 3 | 5 | 7 | | +------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | +11000 | xx | 00000 | rs1 | rm | rd | 1010011 | FCVT.W.xx | +11000 | xx | 00001 | rs1 | rm | rd | 1010011 | FCVT.WU.xx | +11000 | xx | 00010 | rs1 | rm | rd | 1010011 | FCVT.L.xx | +11000 | xx | 00011 | rs1 | rm | rd | 1010011 | FCVT.LU.xx | +11000 | xx | xxxxx | rs1 | rm | rd | 1010011 | rs2? | +"""]] + +# funct5 = 11010 + +[[!table data=""" +31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function | +funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | | + 5 | 2 | 5 | 5 | 3 | 5 | 7 | | +------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | +11010 | xx | 00000 | rs1 | rm | rd | 1010011 | FCVT.xx.W | +11010 | xx | 00001 | rs1 | rm | rd | 1010011 | FCVT.xx.WU | +11010 | xx | 00010 | rs1 | rm | rd | 1010011 | FCVT.xx.L | +11010 | xx | 00011 | rs1 | rm | rd | 1010011 | FCVT.xx.LU | +11010 | xx | xxxxx | rs1 | rm | rd | 1010011 | rs2? | +"""]] + +# funct5 = 11100 + +[[!table data=""" +31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function | +funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | | + 5 | 2 | 5 | 5 | 3 | 5 | 7 | | +------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | +11100 | xx | 00000 | rs1 | 000 | rd | 1010011 | FMV.xx.W | +11100 | xx | 00000 | rs1 | 001 | rd | 1010011 | FCLASS.xx | +11100 | xx | xxxxx | rs1 | yyy | rd | 1010011 | rs2? f3? | +"""]] + +# funct5 = 11110 + +[[!table data=""" +31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function | +funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | | + 5 | 2 | 5 | 5 | 3 | 5 | 7 | | +------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | +11110 | xx | 00000 | rs1 | 000 | rd | 1010011 | FMV.W.xx | +11110 | xx | xxxxx | rs1 | yyy | rd | 1010011 | rs2? f3? | +"""]] + +# funct5 = ????? + +[[!table data=""" +31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function | +funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | | + 5 | 2 | 5 | 5 | 3 | 5 | 7 | | +------ | ----- | ----- | -----| ----- | ----- | ------- | -------- | """]]