From: Luke Kenneth Casson Leighton Date: Tue, 6 Aug 2019 23:12:36 +0000 (+0100) Subject: add hypotenuse opcode X-Git-Tag: convert-csv-opcode-to-binary~4261 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6385af8c6fe8506f14dd62f27fd7618cbb58ce57;p=libreriscv.git add hypotenuse opcode --- diff --git a/rv_major_opcode_1010011.mdwn b/rv_major_opcode_1010011.mdwn index 82d69456d..5e2f48d88 100644 --- a/rv_major_opcode_1010011.mdwn +++ b/rv_major_opcode_1010011.mdwn @@ -56,7 +56,7 @@ 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** | @@ -238,9 +238,9 @@ funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name | 01011 | xx | 11111 | rs1 | rm | rd | 1010011 | ? | """]] -## funct5 = 01100 - unused +## funct5 = 01100 - **FHYPOT** -Brownfield encodings available. +Proposed for Zftrans - FHYPOT: "sqrt(rs1 * rs1 + rs2 * rs2)" ## funct5 = 01101 - **FATAN2** diff --git a/ztrans_proposal.mdwn b/ztrans_proposal.mdwn index d0dff7e26..f68b02fbc 100644 --- a/ztrans_proposal.mdwn +++ b/ztrans_proposal.mdwn @@ -30,6 +30,7 @@ FATAN2 | atan2 arc tangent | rd = atan2(rs2, rs1) | Zarctrignpi | FATAN2PI | atan 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 | +FHYPOT | hypotenuse | rd = sqrt(x^2 + y^2) | Zftrans | """]] # List of 1-arg transcendental opcodes