From: Luke Kenneth Casson Leighton Date: Wed, 14 Aug 2019 14:35:48 +0000 (+0100) Subject: add FATAN and FATANPI back in, because they can be implemented with higher X-Git-Tag: convert-csv-opcode-to-binary~4204 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5323fa8dadb370e1cace05421bac24ab275942b6;p=libreriscv.git add FATAN and FATANPI back in, because they can be implemented with higher accuracy on UNIX platforms --- diff --git a/rv_major_opcode_1010011.mdwn b/rv_major_opcode_1010011.mdwn index 5e2f48d88..5d2281750 100644 --- a/rv_major_opcode_1010011.mdwn +++ b/rv_major_opcode_1010011.mdwn @@ -11,8 +11,10 @@ Publicly-known FP proposals: * Zfrsqrt - Reciprocal SQRT * Zftrans - see [[ztrans_proposal]]: Transcendentals - (FSIN, FCOS, FATAN, FPOW, FEXP, FLOG, FRCP) + (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 - @@ -230,8 +232,8 @@ funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name | 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 | **FTANPI.xx** | -01011 | xx | 11010 | rs1 | rm | rd | 1010011 | ? | -01011 | xx | 11011 | rs1 | rm | rd | 1010011 | ? | +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** | 01011 | xx | 11110 | rs1 | rm | rd | 1010011 | **FTANH.xx** | diff --git a/ztrans_proposal.mdwn b/ztrans_proposal.mdwn index 0e192a0d9..f3ae0c357 100644 --- a/ztrans_proposal.mdwn +++ b/ztrans_proposal.mdwn @@ -69,13 +69,13 @@ FTAN | tan | half\_tan | native\_tan | NONE | NONE (1) | sincos | NONE | NONE | NONE | FASIN | asin | NONE | NONE | NONE | FACOS | acos | NONE | NONE | NONE | -NONE (3) | atan | NONE | NONE | NONE | +FATAN | atan | NONE | NONE | NONE | FSINPI | sinpi | NONE | NONE | NONE | FCOSPI | cospi | NONE | NONE | NONE | FTANPI | tanpi | NONE | NONE | NONE | FASINPI | asinpi | NONE | NONE | NONE | FACOSPI | acospi | NONE | NONE | NONE | -NONE (2) | atanpi | NONE | NONE | NONE | +FATANPI | atanpi | NONE | NONE | NONE | FSINH | sinh | NONE | NONE | NONE | FCOSH | cosh | NONE | NONE | NONE | FTANH | tanh | NONE | NONE | NONE | @@ -102,10 +102,6 @@ NONE (4) | NONE | half\_recip | native\_recip | NONE | Note (1) FSINCOS is macro-op fused (see below). -Note (2) FATANPI is a synthesised alias, below. - -Note (3) FATAN2 is a sythesised alias, below. - Note (4) FCRECIP is a sythesised alias, below. # List of 2-arg opcodes @@ -144,6 +140,7 @@ FCOS | cos (radians) | rd = cos(rs1) | Ztrignpi | FTAN | tan (radians) | rd = tan(rs1) | Ztrignpi | FASIN | arcsin (radians) | rd = asin(rs1) | Zarctrignpi | FACOS | arccos (radians) | rd = acos(rs1) | Zarctrignpi | +FATAN | arctan (radians) | rd = atan(rs1) | Zarctrignpi | FSINPI | sin times pi | rd = sin(pi * rs1) | Ztrigpi | FCOSPI | cos times pi | rd = cos(pi * rs1) | Ztrigpi | FTANPI | tan times pi | rd = tan(pi * rs1) | Ztrigpi | @@ -166,8 +163,6 @@ pseudo-ops, by allocating one scalar FP register for use as a constant suitable code block. * FRCP rd, rs1 - pseudo-code alias for rd = 1.0 / rs1 -* FATAN - pseudo-code alias for rd = atan2(rs1, 1.0) - FATAN2 -* FATANPI - pseudo alias for rd = atan2pi(rs1, 1.0) - FATAN2PI * FSINCOS - fused macro-op between FSIN and FCOS (issued in that order). * FSINCOSPI - fused macro-op between FSINPI and FCOSPI (issued in that order). @@ -177,7 +172,8 @@ FATANPI example pseudo-code: fmv.x.s ft0, t0 fatan2pi.s rd, rs1, ft0 -Hyperbolic function example (obviates need for Zfhyp except for high-performance or correctly-rounding): +Hyperbolic function example (obviates need for Zfhyp except for +high-performance or correctly-rounding): ASINH( x ) = ln( x + SQRT(x**2+1))