From ab955d3d3b5739fe137c56acb1f1e9fac8bad65a Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 12 Sep 2019 03:58:06 +0100 Subject: [PATCH] FROOTN 2nd argument is integer --- rv_major_opcode_1010011.mdwn | 7 ++++--- ztrans_proposal.mdwn | 12 +++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/rv_major_opcode_1010011.mdwn b/rv_major_opcode_1010011.mdwn index bcd573f7c..5a5cb4fcb 100644 --- a/rv_major_opcode_1010011.mdwn +++ b/rv_major_opcode_1010011.mdwn @@ -62,7 +62,7 @@ funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name | 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** | +10000 | xx | rs2 | rs1 | yyy | rd | 1010011 | **FROOTN.xx** | 10001 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | 10010 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | 10011 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? | @@ -257,9 +257,10 @@ 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 diff --git a/ztrans_proposal.mdwn b/ztrans_proposal.mdwn index 22affebac..7610755be 100644 --- a/ztrans_proposal.mdwn +++ b/ztrans_proposal.mdwn @@ -373,7 +373,7 @@ FLOG | log | half\_log | native\_log | NONE | log | FEXP10 | exp10 | half\_exp10 | native\_exp10 | NONE | exp10 | FLOG10 | log10 | half\_log10 | native\_log10 | NONE | log10 | FPOW | pow | NONE | NONE | NONE | pow | -FROOT | rootn | NONE | NONE | NONE | rootn | +FROOTN | rootn | NONE | NONE | NONE | rootn | FHYPOT | hypot | NONE | NONE | NONE | hypot | FRECIP | NONE | half\_recip | native\_recip | NONE | NONE (5) | NONE | NONE | NONE | NONE | NONE | compound | @@ -402,7 +402,7 @@ opcode | Description | pseudocode | Extension | FATAN2 | atan2 arc tangent | rd = atan2(rs2, rs1) | Zarctrignpi | FATAN2PI | atan2 arc tangent / pi | rd = atan2(rs2, rs1) / pi | Zarctrigpi | FPOW | x power of y | rd = pow(rs1, rs2) | ZftransAdv | -FROOT | x power 1/y | rd = pow(rs1, 1/rs2) | ZftransAdv | +FROOTN | x power 1/n (n integer)| rd = pow(rs1, 1/rs2) | ZftransAdv | FHYPOT | hypotenuse | rd = sqrt(rs1^2 + rs2^2) | ZftransAdv | """]] @@ -556,12 +556,10 @@ HPC and high-end GPUs are likely markets for these. ### ZftransAdv -CBRT, POW, ROOT (inverse of POW): these are simply much more complex -to implement in hardware, and typically will only be put into HPC -applications. +CBRT, POW, ROOTN -ROOT is included as well as POW because at the extreme ranges one is -more accurate than the other. +These are simply much more complex to implement in hardware, and typically +will only be put into HPC applications. * **Zfrsqrt**: Reciprocal square-root. -- 2.30.2