X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=rv_major_opcode_1010011.mdwn;h=070248011bfb7adb5c5ad8f40b2880690cd50e97;hb=e3b1cc75618ac5a6295c24e44622ec1c465b2a1b;hp=790ee5bd4f4868ebe6a0779e01860855ee9a3f38;hpb=894a7d11587c87e9cb3a2d96122cfe0a147ea4fc;p=libreriscv.git diff --git a/rv_major_opcode_1010011.mdwn b/rv_major_opcode_1010011.mdwn index 790ee5bd4..070248011 100644 --- a/rv_major_opcode_1010011.mdwn +++ b/rv_major_opcode_1010011.mdwn @@ -10,9 +10,13 @@ A primary critical use-case for extending FP is for 3D and supercomputing. Publicly-known FP proposals: * Zfrsqrt - Reciprocal SQRT -* Zftrans - Transcendentals (FSIN, FCOS, FATAN, FPOW, FEXP, FLOG, FRCP) +* Zftrans - see [[ztrans_proposal]]: Transcendentals + (FPOW, FEXP, FLOG, FCBRT) +* Ztrig\* - see [[ztrans_proposal]]: Trigonometriics + (FSIN, FCOS, FTAN, arc-variants, hypotenuse-variants) * Extension of formats to cover FP16 (RISC-V ISA Manual Table 11.3 "fmt field") + * HI-half FP MV - * (Add new entries here: Zextname - Description and URL) @@ -55,13 +59,13 @@ funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name | 01001 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | 01010 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | 01011 | xx | xxxxx | rs1 | yyy | rd | 1010011 | tb=01011 | -01100 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | +01100 | xx | rs2 | rs1 | yyy | rd | 1010011 | **FHYPOT.xx** | 01101 | xx | rs2 | rs1 | rm | rd | 1010011 | **FATAN2.xx** | 01110 | xx | rs2 | rs1 | rm | rd | 1010011 | **FATAN2PI.xx**| 01111 | xx | rs2 | rs1 | rm | rd | 1010011 | **FPOW.xx** | -10000 | xx | rs2 | rs1 | yyy | rd | 1010011 | **FROOT.xx** | -10001 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | -10010 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | +10000 | xx | rs2 | rs1 | yyy | rd | 1010011 | **FROOTN.xx** | +10001 | xx | rs2 | rs1 | yyy | rd | 1010011 | **FPOWN.xx** | +10010 | xx | rs2 | rs1 | yyy | rd | 1010011 | **FPOWR.xx** | 10011 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | 10100 | xx | rs2 | rs1 | yyy | rd | 1010011 | tb=10100 | 10101 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | @@ -103,7 +107,7 @@ No brownfield encodings available. Brownfield encodings available. -## funct5 = 00100 +## funct5 = 00100 - FSGN This table uses funct3 for encoding 2-operand FP operations @@ -121,7 +125,7 @@ funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name | 00100 | xx | rs2 | rs1 | 111 | rd | 1010011 | ?f3=111 | """]] -## funct5 = 00101 +## funct5 = 00101 - FMIN/MAX This table uses funct3 for encoding 2-operand FP operations where the result register is a **floating-point** value. @@ -148,7 +152,7 @@ Brownfield encodings available. Brownfield encodings available. -## funct5 = 01000 +## funct5 = 01000 - FCVT This table uses rs2 for encoding 1-operand FP operations, using funct3 to specify the "rounding" mode @@ -205,7 +209,7 @@ funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name | 5 | 2 | 5 | 5 | 3 | 5 | 7 | | 01011 | xx | 00000 | rs1 | rm | rd | 1010011 | FSQRT.xx | 01011 | xx | 00001 | rs1 | rm | rd | 1010011 | **FRSQRT.xx** | -01011 | xx | 00010 | rs1 | rm | rd | 1010011 | **FRCP.xx** | +01011 | xx | 00010 | rs1 | rm | rd | 1010011 | **FRECIP.xx** | 01011 | xx | 00011 | rs1 | rm | rd | 1010011 | **FCBRT.xx** | 01011 | xx | 00100 | rs1 | rm | rd | 1010011 | **FEXP2.xx** | 01011 | xx | 00101 | rs1 | rm | rd | 1010011 | **FLOG2.xx** | @@ -220,16 +224,16 @@ funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name | 01011 | xx | 01110 | rs1 | rm | rd | 1010011 | **FATANH.xx** | 01011 | xx | 01111 | rs1 | rm | rd | 1010011 | ? | 01011 | xx | 10000 | rs1 | rm | rd | 1010011 | **FSIN.xx** | -01011 | xx | 10001 | rs1 | rm | rd | 1010011 | **FASIN.xx** | -01011 | xx | 10010 | rs1 | rm | rd | 1010011 | **FSINPI.xx** | +01011 | xx | 10001 | rs1 | rm | rd | 1010011 | **FSINPI.xx** | +01011 | xx | 10010 | rs1 | rm | rd | 1010011 | **FASIN.xx** | 01011 | xx | 10011 | rs1 | rm | rd | 1010011 | **FASINPI.xx**| 01011 | xx | 10100 | rs1 | rm | rd | 1010011 | **FCOS.xx** | -01011 | xx | 10101 | rs1 | rm | rd | 1010011 | **FACOS.xx** | -01011 | xx | 10110 | rs1 | rm | rd | 1010011 | **FCOSPI.xx** | +01011 | xx | 10101 | rs1 | rm | rd | 1010011 | **FCOSPI.xx** | +01011 | xx | 10110 | rs1 | rm | rd | 1010011 | **FACOS.xx** | 01011 | xx | 10111 | rs1 | rm | rd | 1010011 | **FACOSPI.xx**| 01011 | xx | 11000 | rs1 | rm | rd | 1010011 | **FTAN.xx** | -01011 | xx | 11001 | rs1 | rm | rd | 1010011 | **FATAN.xx** | -01011 | xx | 11010 | rs1 | rm | rd | 1010011 | **FTANPI.xx** | +01011 | xx | 11001 | rs1 | rm | rd | 1010011 | **FTANPI.xx** | +01011 | xx | 11010 | rs1 | rm | rd | 1010011 | **FATAN.xx** | 01011 | xx | 11011 | rs1 | rm | rd | 1010011 | **FATANPI.xx**| 01011 | xx | 11100 | rs1 | rm | rd | 1010011 | **FSINH.xx** | 01011 | xx | 11101 | rs1 | rm | rd | 1010011 | **FCOSH.xx** | @@ -237,15 +241,9 @@ funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name | 01011 | xx | 11111 | rs1 | rm | rd | 1010011 | ? | """]] +## funct5 = 01100 - **FHYPOT** - - - - - -## funct5 = 01100 - unused - -Brownfield encodings available. +Proposed for Zftrans - FHYPOT: "sqrt(rs1 * rs1 + rs2 * rs2)" ## funct5 = 01101 - **FATAN2** @@ -260,17 +258,20 @@ Rationale: Gives better accuracy than if using FMUL with the constant, PI. Proposed for ZftransAdv - FPOW: "FP rs1 to the power of rs2" -## funct5 = 10000 - **FROOT** +## funct5 = 10000 - **FROOTN** -Proposed for ZftransAdv - FPROOT: "FP rs1 to the power of (1/rs2)" +Proposed for ZftransAdv - FPROOTN: "FP rs1 to the power of (1/rs2)". +rs1 is FP, rs2 is **integer**. -## funct5 = 10000 - unused +## funct5 = 10000 - **FPOWN** -Brownfield encodings available. +Proposed for ZftransAdv - FPOW: "FP rs1 to the power of rs2" +rs1 is FP, rs2 is **integer**. -## funct5 = 10001 - unused +## funct5 = 10001 - **FPOW** -Brownfield encodings available. +Proposed for ZftransAdv - FPOWN: "FP rs1 to the power of rs2, rs1 +ve" +rs1 and rs2 are FP, rs1 must be +ve. Equivalent to "exp(rs2 * log(rs1))" ## funct5 = 10010 - unused @@ -280,7 +281,7 @@ Brownfield encodings available. Brownfield encodings available. -## funct5 = 10100 +## funct5 = 10100 - FP comparisons This table uses funct3 for encoding 2-operand FP "comparison" operations where the result register is an **integer** @@ -315,7 +316,7 @@ Brownfield encodings available. Brownfield encodings available. -## funct5 = 11000 +## funct5 = 11000 - FCVT This table uses rs2 for encoding 1-operand FP operations, using funct3 to specify the "rounding" mode @@ -357,7 +358,7 @@ funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name | Brownfield encodings available. -## funct5 = 11010 +## funct5 = 11010 - FCVT This table uses rs2 for encoding 1-operand FP operations, using funct3 to specify the "rounding" mode @@ -393,7 +394,7 @@ funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name | 11010 | 11 | xxxxx | rs1 | rm | rd | 1010011 | rs2? | """]] -## funct5 = 11100 +## funct5 = 11100 - FMV, FCLASS This table uses *both* rs2 *and* funct3 for encoding 1-operand FP operations. @@ -428,7 +429,7 @@ funct5| SDHQ | rs2 | rs1 |funct3 | rd | opcode | name | Brownfield encodings available. -## funct5 = 11110 +## funct5 = 11110 - FMV This table uses *both* rs2 *and* funct3 for encoding 1-operand FP operations.