# DRAFT List of 2-arg opcodes These are A-Form, recommended Major Opcode 63 for full-width and 59 for half-width (ending in s). | 0.5|6.10|11.15|16.20| 21.25 | 26.30 |31| name | Form | | -- | -- | --- | --- | ----- | ----- |--| ---- | ------- | | NN |FRT | FRA | FRB | /// | xxxxx |Rc| trigonometric | A-Form | As shown in Power ISA 3.1 Book III Appendix D Table 28 p1190 and Table 23 p1368, Major Opcode 63 has room for 9 A-Form 5-bit XO instructions, Major Opcode 59 has 11 5-bit XO instructions, with some overlap leading to a partially orthogonal set across full and half width. | opcode | Description | Major 63 | Major 59 | | ------ | ---------------- | ---------------- | ----------- | | fatan2(s) | atan2 arc tangent | 00001 | 00001 | | fatan2pi(s)|atan2 arc tangent / pi | 01001 | 00111 | | fpow(s) | x power of y | 10000 | 10000 | | fpown(s) | x power of n (n int) | 10001 | 10001 | | fpowr(s) | x power of y (x +ve) | 10011 | 10011 | | frootn(s) | x power 1/n (n integer)| 11011 | 11011 | | fhypot(s) | hypotenuse | 01101 | 10111 | # DRAFT List of 1-arg transcendental opcodes These are X-Form, and are identical in Special Registers Altered to `fsqrt`. Recommended Major Opcode 63 for full-width and 59 for half-width (ending in s). Special Registers Altered: FPRF FR FI FX OX UX XX VXSNAN VXIMZ VXZDZ CR1 (if Rc=1) | 0.5|6.10|11.15|16.20| 21..30 |31| name | Form | | -- | -- | --- | --- | ---------- |--| ---- | ------- | | NN |FRT | /// | FRB | 1xxxx0111x |Rc| transcendental | X-Form | Recommended 10-bit XO with the low 5 LSBs 01100: | opcode | Description | Major 59 and 63 | | ------ | ---------------- | ---------------- | | frsqrt(s)| Reciprocal Square-root | 10000 01110 | | fcbrt(s) | Cube Root | 10001 01110 | | frecip(s)| Reciprocal | 10010 01111 | | fexp2m1(s)| power-2 minus 1 | 10100 01110 | | flog2p1(s)| log2 plus 1 | 10101 01110 | | fexp2(s) | power-of-2 | 10110 01110 | | flog2(s) | log2 | 10111 01111 | | fexpm1(s)| exponential minus 1 | 11000 01110 | | flogp1(s)| log plus 1 | 11001 01110 | | fexp(s) | exponential | 11010 01110 | | flog(s) | natural log (base e) | 11011 01111 | | fexp10m1(s)| power-10 minus 1 | 11100 01110 | | flog10p1(s)| log10 plus 1 | 11101 01110 | | fexp10(s)| power-of-10 | 11110 01110 | | flog10(s)| log base 10 |11111 01111 | # DRAFT List of 1-arg trigonometric opcodes These are X-Form, and are identical in Special Registers Altered to `fsqrt`. Recommended Major Opcode 63 for full-width and 59 for half-width (ending in s) Special Registers Altered: FPRF FR FI FX OX UX XX VXSNAN VXIMZ VXZDZ CR1 (if Rc=1) | 0.5|6.10|11.15|16.20| 21..30 |31| name | Form | | -- | -- | --- | --- | ---------- |--| ---- | ------- | | NN |FRT | /// | FRB | 10xxx011xx |Rc| trigonometric | X-Form | Recommended 10-bit XO with the low 5 LSBs 01101 to 01111: | opcode | Description | Major 59 and 63 | | ------ | ---------------- | ---------------- | | fsin(s) | sin (radians) | 10000 01101 | | fcos(s) | cos (radians) | 10000 01110 | | ftan(s) | tan (radians) | 10000 01111 | | fasin(s) | arcsin (radians) | 10001 01101 | | facos(s) | arccos (radians) | 10001 01110 | | fatan(s) | arctan (radians) | 10001 01111 | | fsinpi(s) | sin times pi | 10010 01101 | | fcospi(s) | cos times pi | 10010 01110 | | ftanpi(s) | tan times pi | 10010 01111 | | fasinpi(s) | arcsin / pi | 10011 01101 | | facospi(s) | arccos / pi | 10011 01110 | | fatanpi(s) | arctan / pi | 10011 01111 | | fsinh(s) | hyperbolic sin (radians) | 10100 01101 | | fcosh(s) | hyperbolic cos (radians) | 10100 01110 | | ftanh(s) | hyperbolic tan (radians) | 10100 01111 | | fasinh(s) | inverse hyperbolic sin | 10101 01111 | | facosh(s) | inverse hyperbolic cos | 10101 01111 | | fatanh(s) | inverse hyperbolic tan | 10101 01111 |