From: Jacob Lifshay Date: Fri, 9 Sep 2022 06:29:26 +0000 (-0700) Subject: fptrans: lowercase instruction mnemonics X-Git-Tag: opf_rfc_ls005_v1~565 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ddcedbccfe0e663ee90e78a81f9621dd005508ef;p=libreriscv.git fptrans: lowercase instruction mnemonics --- diff --git a/openpower/transcendentals.mdwn b/openpower/transcendentals.mdwn index c565afd9e..e07592d3e 100644 --- a/openpower/transcendentals.mdwn +++ b/openpower/transcendentals.mdwn @@ -136,50 +136,50 @@ compound, exp2m1, exp10m1, log2p1, log10p1, pown (integer power) and powr. |opcode |OpenCL FP32|OpenCL FP16|OpenCL native|IEEE754 |Power ISA | |------- |-----------|-----------|-------------|------- |--------- | -|FSIN |sin |half\_sin |native\_sin |sin |NONE | -|FCOS |cos |half\_cos |native\_cos |cos |NONE | -|FTAN |tan |half\_tan |native\_tan |tan |NONE | +|fsin |sin |half\_sin |native\_sin |sin |NONE | +|fcos |cos |half\_cos |native\_cos |cos |NONE | +|ftan |tan |half\_tan |native\_tan |tan |NONE | |NONE (1)|sincos |NONE |NONE |NONE |NONE | -|FASIN |asin |NONE |NONE |asin |NONE | -|FACOS |acos |NONE |NONE |acos |NONE | -|FATAN |atan |NONE |NONE |atan |NONE | -|FSINPI |sinpi |NONE |NONE |sinPi |NONE | -|FCOSPI |cospi |NONE |NONE |cosPi |NONE | -|FTANPI |tanpi |NONE |NONE |tanPi |NONE | -|FASINPI |asinpi |NONE |NONE |asinPi |NONE | -|FACOSPI |acospi |NONE |NONE |acosPi |NONE | -|FATANPI |atanpi |NONE |NONE |atanPi |NONE | -|FSINH |sinh |NONE |NONE |sinh |NONE | -|FCOSH |cosh |NONE |NONE |cosh |NONE | -|FTANH |tanh |NONE |NONE |tanh |NONE | -|FASINH |asinh |NONE |NONE |asinh |NONE | -|FACOSH |acosh |NONE |NONE |acosh |NONE | -|FATANH |atanh |NONE |NONE |atanh |NONE | -|FATAN2 |atan2 |NONE |NONE |atan2 |NONE | -|FATAN2PI|atan2pi |NONE |NONE |atan2pi |NONE | -|FRSQRT |rsqrt |half\_rsqrt|native\_rsqrt|rSqrt |fsqrte, fsqrtes (4) | -|FCBRT |cbrt |NONE |NONE |NONE (2)|NONE | -|FEXP2 |exp2 |half\_exp2 |native\_exp2 |exp2 |NONE | -|FLOG2 |log2 |half\_log2 |native\_log2 |log2 |NONE | -|FEXPM1 |expm1 |NONE |NONE |expm1 |NONE | -|FLOG1P |log1p |NONE |NONE |logp1 |NONE | -|FEXP |exp |half\_exp |native\_exp |exp |NONE | -|FLOG |log |half\_log |native\_log |log |NONE | -|FEXP10 |exp10 |half\_exp10|native\_exp10|exp10 |NONE | -|FLOG10 |log10 |half\_log10|native\_log10|log10 |NONE | -|FPOW |pow |NONE |NONE |pow |NONE | -|FPOWN |pown |NONE |NONE |pown |NONE | -|FPOWR |powr |half\_powr |native\_powr |powr |NONE | -|FROOTN |rootn |NONE |NONE |rootn |NONE | -|FHYPOT |hypot |NONE |NONE |hypot |NONE | -|FRECIP |NONE |half\_recip|native\_recip|NONE (3)|fre, fres (4) | +|fasin |asin |NONE |NONE |asin |NONE | +|facos |acos |NONE |NONE |acos |NONE | +|fatan |atan |NONE |NONE |atan |NONE | +|fsinpi |sinpi |NONE |NONE |sinPi |NONE | +|fcospi |cospi |NONE |NONE |cosPi |NONE | +|ftanpi |tanpi |NONE |NONE |tanPi |NONE | +|fasinpi |asinpi |NONE |NONE |asinPi |NONE | +|facospi |acospi |NONE |NONE |acosPi |NONE | +|fatanpi |atanpi |NONE |NONE |atanPi |NONE | +|fsinh |sinh |NONE |NONE |sinh |NONE | +|fcosh |cosh |NONE |NONE |cosh |NONE | +|ftanh |tanh |NONE |NONE |tanh |NONE | +|fasinh |asinh |NONE |NONE |asinh |NONE | +|facosh |acosh |NONE |NONE |acosh |NONE | +|fatanh |atanh |NONE |NONE |atanh |NONE | +|fatan2 |atan2 |NONE |NONE |atan2 |NONE | +|fatan2pi|atan2pi |NONE |NONE |atan2pi |NONE | +|frsqrt |rsqrt |half\_rsqrt|native\_rsqrt|rSqrt |fsqrte, fsqrtes (4) | +|fcbrt |cbrt |NONE |NONE |NONE (2)|NONE | +|fexp2 |exp2 |half\_exp2 |native\_exp2 |exp2 |NONE | +|flog2 |log2 |half\_log2 |native\_log2 |log2 |NONE | +|fexpm1 |expm1 |NONE |NONE |expm1 |NONE | +|flog1p |log1p |NONE |NONE |logp1 |NONE | +|fexp |exp |half\_exp |native\_exp |exp |NONE | +|flog |log |half\_log |native\_log |log |NONE | +|fexp10 |exp10 |half\_exp10|native\_exp10|exp10 |NONE | +|flog10 |log10 |half\_log10|native\_log10|log10 |NONE | +|fpow |pow |NONE |NONE |pow |NONE | +|fpown |pown |NONE |NONE |pown |NONE | +|fpowr |powr |half\_powr |native\_powr |powr |NONE | +|frootn |rootn |NONE |NONE |rootn |NONE | +|fhypot |hypot |NONE |NONE |hypot |NONE | +|frecip |NONE |half\_recip|native\_recip|NONE (3)|fre, fres (4) | |NONE |NONE |NONE |NONE |compound|NONE | -|FEXP2M1 |NONE |NONE |NONE |exp2m1 |NONE | -|FEXP10M1|NONE |NONE |NONE |exp10m1 |NONE | -|FLOG2P1 |NONE |NONE |NONE |log2p1 |NONE | -|FLOG10P1|NONE |NONE |NONE |log10p1 |NONE | +|fexp2m1 |NONE |NONE |NONE |exp2m1 |NONE | +|fexp10m1|NONE |NONE |NONE |exp10m1 |NONE | +|flog2p1 |NONE |NONE |NONE |log2p1 |NONE | +|flog10p1|NONE |NONE |NONE |log10p1 |NONE | -Note (1) FSINCOS is macro-op fused (see below). +Note (1) fsincos is macro-op fused (see below). Note (2) synthesised in IEEE754-2019 as "rootn(x, 3)" @@ -192,56 +192,56 @@ software emulation | opcode | Description | pseudocode | Extension | | ------ | ---------------- | ---------------- | ----------- | -| FATAN2 | atan2 arc tangent | FRT = atan2(FRB, FRA) | Zarctrignpi | -| FATAN2PI | atan2 arc tangent / pi | FRT = atan2(FRB, FRA) / pi | Zarctrigpi | -| FPOW | x power of y | FRT = pow(FRA, FRB) | ZftransAdv | -| FPOWN | x power of n (n int) | FRT = pow(FRA, RB) | ZftransAdv | -| FPOWR | x power of y (x +ve) | FRT = exp(FRA log(FRB)) | ZftransAdv | -| FROOTN | x power 1/n (n integer)| FRT = pow(FRA, 1/RB) | ZftransAdv | -| FHYPOT | hypotenuse | FRT = sqrt(FRA^2 + FRB^2) | ZftransAdv | +| fatan2 | atan2 arc tangent | FRT = atan2(FRB, FRA) | Zarctrignpi | +| fatan2pi | atan2 arc tangent / pi | FRT = atan2(FRB, FRA) / pi | Zarctrigpi | +| fpow | x power of y | FRT = pow(FRA, FRB) | ZftransAdv | +| fpown | x power of n (n int) | FRT = pow(FRA, RB) | ZftransAdv | +| fpowr | x power of y (x +ve) | FRT = exp(FRA log(FRB)) | ZftransAdv | +| frootn | x power 1/n (n integer)| FRT = pow(FRA, 1/RB) | ZftransAdv | +| fhypot | hypotenuse | FRT = sqrt(FRA^2 + FRB^2) | ZftransAdv | ## List of 1-arg transcendental opcodes | opcode | Description | pseudocode | Extension | | ------ | ---------------- | ---------------- | ---------- | -| FRSQRT | Reciprocal Square-root | FRT = sqrt(FRA) | Zfrsqrt | -| FCBRT | Cube Root | FRT = pow(FRA, 1.0 / 3) | ZftransAdv | -| FRECIP | Reciprocal | FRT = 1.0 / FRA | Zftrans | -| FEXP2M1 | power-2 minus 1 | FRT = pow(2, FRA) - 1.0 | ZftransExt | -| FLOG2P1 | log2 plus 1 | FRT = log(2, 1 + FRA) | ZftransExt | -| FEXP2 | power-of-2 | FRT = pow(2, FRA) | Zftrans | -| FLOG2 | log2 | FRT = log(2. FRA) | Zftrans | -| FEXPM1 | exponential minus 1 | FRT = pow(e, FRA) - 1.0 | ZftransExt | -| FLOG1P | log plus 1 | FRT = log(e, 1 + FRA) | ZftransExt | -| FEXP | exponential | FRT = pow(e, FRA) | ZftransExt | -| FLOG | natural log (base e) | FRT = log(e, FRA) | ZftransExt | -| FEXP10M1 | power-10 minus 1 | FRT = pow(10, FRA) - 1.0 | ZftransExt | -| FLOG10P1 | log10 plus 1 | FRT = log(10, 1 + FRA) | ZftransExt | -| FEXP10 | power-of-10 | FRT = pow(10, FRA) | ZftransExt | -| FLOG10 | log base 10 | FRT = log(10, FRA) | ZftransExt | +| frsqrt | Reciprocal Square-root | FRT = sqrt(FRA) | Zfrsqrt | +| fcbrt | Cube Root | FRT = pow(FRA, 1.0 / 3) | ZftransAdv | +| frecip | Reciprocal | FRT = 1.0 / FRA | Zftrans | +| fexp2m1 | power-2 minus 1 | FRT = pow(2, FRA) - 1.0 | ZftransExt | +| flog2p1 | log2 plus 1 | FRT = log(2, 1 + FRA) | ZftransExt | +| fexp2 | power-of-2 | FRT = pow(2, FRA) | Zftrans | +| flog2 | log2 | FRT = log(2. FRA) | Zftrans | +| fexpm1 | exponential minus 1 | FRT = pow(e, FRA) - 1.0 | ZftransExt | +| flog1p | log plus 1 | FRT = log(e, 1 + FRA) | ZftransExt | +| fexp | exponential | FRT = pow(e, FRA) | ZftransExt | +| flog | natural log (base e) | FRT = log(e, FRA) | ZftransExt | +| fexp10m1 | power-10 minus 1 | FRT = pow(10, FRA) - 1.0 | ZftransExt | +| flog10p1 | log10 plus 1 | FRT = log(10, 1 + FRA) | ZftransExt | +| fexp10 | power-of-10 | FRT = pow(10, FRA) | ZftransExt | +| flog10 | log base 10 | FRT = log(10, FRA) | ZftransExt | ## List of 1-arg trigonometric opcodes | opcode | Description | pseudocode | Extension | | -------- | ------------------------ | ------------------------ | ----------- | -| FSIN | sin (radians) | FRT = sin(FRA) | Ztrignpi | -| FCOS | cos (radians) | FRT = cos(FRA) | Ztrignpi | -| FTAN | tan (radians) | FRT = tan(FRA) | Ztrignpi | -| FASIN | arcsin (radians) | FRT = asin(FRA) | Zarctrignpi | -| FACOS | arccos (radians) | FRT = acos(FRA) | Zarctrignpi | -| FATAN | arctan (radians) | FRT = atan(FRA) | Zarctrignpi | -| FSINPI | sin times pi | FRT = sin(pi * FRA) | Ztrigpi | -| FCOSPI | cos times pi | FRT = cos(pi * FRA) | Ztrigpi | -| FTANPI | tan times pi | FRT = tan(pi * FRA) | Ztrigpi | -| FASINPI | arcsin / pi | FRT = asin(FRA) / pi | Zarctrigpi | -| FACOSPI | arccos / pi | FRT = acos(FRA) / pi | Zarctrigpi | -| FATANPI | arctan / pi | FRT = atan(FRA) / pi | Zarctrigpi | -| FSINH | hyperbolic sin (radians) | FRT = sinh(FRA) | Zfhyp | -| FCOSH | hyperbolic cos (radians) | FRT = cosh(FRA) | Zfhyp | -| FTANH | hyperbolic tan (radians) | FRT = tanh(FRA) | Zfhyp | -| FASINH | inverse hyperbolic sin | FRT = asinh(FRA) | Zfhyp | -| FACOSH | inverse hyperbolic cos | FRT = acosh(FRA) | Zfhyp | -| FATANH | inverse hyperbolic tan | FRT = atanh(FRA) | Zfhyp | +| fsin | sin (radians) | FRT = sin(FRA) | Ztrignpi | +| fcos | cos (radians) | FRT = cos(FRA) | Ztrignpi | +| ftan | tan (radians) | FRT = tan(FRA) | Ztrignpi | +| fasin | arcsin (radians) | FRT = asin(FRA) | Zarctrignpi | +| facos | arccos (radians) | FRT = acos(FRA) | Zarctrignpi | +| fatan | arctan (radians) | FRT = atan(FRA) | Zarctrignpi | +| fsinpi | sin times pi | FRT = sin(pi * FRA) | Ztrigpi | +| fcospi | cos times pi | FRT = cos(pi * FRA) | Ztrigpi | +| ftanpi | tan times pi | FRT = tan(pi * FRA) | Ztrigpi | +| fasinpi | arcsin / pi | FRT = asin(FRA) / pi | Zarctrigpi | +| facospi | arccos / pi | FRT = acos(FRA) / pi | Zarctrigpi | +| fatanpi | arctan / pi | FRT = atan(FRA) / pi | Zarctrigpi | +| fsinh | hyperbolic sin (radians) | FRT = sinh(FRA) | Zfhyp | +| fcosh | hyperbolic cos (radians) | FRT = cosh(FRA) | Zfhyp | +| ftanh | hyperbolic tan (radians) | FRT = tanh(FRA) | Zfhyp | +| fasinh | inverse hyperbolic sin | FRT = asinh(FRA) | Zfhyp | +| facosh | inverse hyperbolic cos | FRT = acosh(FRA) | Zfhyp | +| fatanh | inverse hyperbolic tan | FRT = atanh(FRA) | Zfhyp | [[!inline pages="openpower/power_trans_ops" raw=yes ]] @@ -416,10 +416,10 @@ pseudo-ops, by allocating one scalar FP register for use as a constant (loop invariant) set to "1.0" at the beginning of a function or other suitable code block. -* FSINCOS - fused macro-op between FSIN and FCOS (issued in that order). -* FSINCOSPI - fused macro-op between FSINPI and FCOSPI (issued in that order). +* fsincos - fused macro-op between fsin and fcos (issued in that order). +* fsincospi - fused macro-op between fsinpi and fcospi (issued in that order). -FATANPI example pseudo-code: +fatanpi example pseudo-code: fmvis ft0, 0x3F800 // upper bits of f32 1.0 (BF16) fatan2pis FRT, FRA, ft0