5 Power ISA v3.1B opcodes extracted from Power ISA v3.1B Appendix D Table 23 sheet 2 of 4 page 1391
7 Parenthesized entries are not part of fptrans.
9 <!-- <template> is used to make html ignore what's inside it,
10 needed since pandoc conversion to latex ignores <br> tags-->
12 | XO LSB half →<br> XO MSB half ↓ | 01100 | 01101 | 01110 | 01111 |
13 |-----------------------------------------------|---------------------------------------------------------------------|--------------------------------------------------------------------|----------------------------------------------------------------------|---------------------------------------------------------------------|
14 | 10000 | `10000 01100`<template>\linebreak[4]</template><br>(ffadds) (draft) | `10000 01101`<template>\linebreak[4]</template><br>fsinpis (draft) | `10000 01110`<template>\linebreak[4]</template><br>fatan2pis (draft) | `10000 01111`<template>\linebreak[4]</template><br>fasinpis (draft) |
15 | 10001 | `10001 01100`<template>\linebreak[4]</template><br>fcospis (draft) | `10001 01101`<template>\linebreak[4]</template><br>ftanpis (draft) | `10001 01110`<template>\linebreak[4]</template><br>facospis (draft) | `10001 01111`<template>\linebreak[4]</template><br>fatanpis (draft) |
16 | 10010 | `10010 01100`<template>\linebreak[4]</template><br>**TBD** (draft) | `10010 01101`<template>\linebreak[4]</template><br>fsins (draft) | `10010 01110`<template>\linebreak[4]</template><br>fatan2s (draft) | `10010 01111`<template>\linebreak[4]</template><br>fasins (draft) |
17 | 10011 | `10011 01100`<template>\linebreak[4]</template><br>fcoss (draft) | `10011 01101`<template>\linebreak[4]</template><br>ftans (draft) | `10011 01110`<template>\linebreak[4]</template><br>facoss (draft) | `10011 01111`<template>\linebreak[4]</template><br>fatans (draft) |
18 | 10100 | `10100 01100`<template>\linebreak[4]</template><br>**TBD** (draft) | `10100 01101`<template>\linebreak[4]</template><br>fsinhs (draft) | `10100 01110`<template>\linebreak[4]</template><br>fhypots (draft) | `10100 01111`<template>\linebreak[4]</template><br>fasinhs (draft) |
19 | 10101 | `10101 01100`<template>\linebreak[4]</template><br>fcoshs (draft) | `10101 01101`<template>\linebreak[4]</template><br>ftanhs (draft) | `10101 01110`<template>\linebreak[4]</template><br>facoshs (draft) | `10101 01111`<template>\linebreak[4]</template><br>fatanhs (draft) |
20 | 10110 | `10110 01100`<template>\linebreak[4]</template><br>**TBD** (draft) | `10110 01101`<template>\linebreak[4]</template><br>**TBD** (draft) | `10110 01110`<template>\linebreak[4]</template><br>**TBD** (draft) | `10110 01111`<template>\linebreak[4]</template><br>**TBD** (draft) |
21 | 10111 | `10111 01100`<template>\linebreak[4]</template><br>**TBD** (draft) | `10111 01101`<template>\linebreak[4]</template><br>**TBD** (draft) | `10111 01110`<template>\linebreak[4]</template><br>**TBD** (draft) | `10111 01111`<template>\linebreak[4]</template><br>**TBD** (draft) |
25 Power ISA v3.1B opcodes extracted from Power ISA v3.1B Appendix D Table 25 sheet 2 of 4 page 1399
27 | XO LSB half → <br/> XO MSB half ↓ | 01100 | 01101 | 01110 | 01111 |
28 |-------------------------------------------------|-------|-------|-------|-------|
38 # DRAFT List of 2-arg opcodes
40 FIXME(programmerjake): reallocate and convert to X-FORM
42 These are X-Form, recommended Major Opcode 63 for full-width
43 and 59 for half-width (ending in s).
45 | 0.5|6.10|11.15|16.20| 21..30 |31| name | Form |
46 | -- | -- | --- | --- | ---------- |--| ---- | ------- |
47 | NN |FRT | FRA | FRB | 10xxx011xx |Rc| transcendental | X-Form |
49 As shown in Power ISA 3.1 Book III Appendix D Table 28 p1190
51 Major Opcode 63 has room
52 for 9 A-Form 5-bit XO instructions,
53 Major Opcode 59 has 11 5-bit XO instructions,
54 with some overlap leading to a partially orthogonal
55 set across full and half width.
57 | opcode | Description | Major 59 and 63 |
58 |------------|-----------------------------------------|-----------------|
59 | fatan2(s) | atan2 arc tangent | 10010 01110 |
60 | fatan2pi(s)| atan2 arc tangent / π | 10000 01110 |
61 | fpow(s) | x<sup>y</sup> | |
62 | fpown(s) | x<sup>n</sup> (n ∈ ℤ) | |
63 | fpowr(s) | x<sup>y</sup> (x >= 0) | |
64 | frootn(s) | <sup>n</sup>√x (n ∈ ℤ) | |
65 | fhypot(s) | √(x<sup>2</sup> + y<sup>2</sup>) | 10100 01110 |
67 # DRAFT List of 1-arg transcendental opcodes
69 FIXME(programmerjake): reallocate
71 These are X-Form, and are identical in Special Registers Altered to `fsqrt`.
72 Recommended Major Opcode 63 for full-width and 59 for half-width (ending in s).
74 Special Registers Altered:
76 FPRF FR FI FX OX UX XX
80 | 0.5|6.10|11.15|16.20| 21..30 |31| name | Form |
81 | -- | -- | --- | --- | ---------- |--| ---- | ------- |
82 | NN |FRT | /// | FRB | 10xxx011xx |Rc| transcendental | X-Form |
84 Recommended 10-bit XO with the low 5 LSBs 01100:
86 | opcode | Description | Major 59 and 63 |
87 |------------|--------------------------|-----------------|
88 | frsqrt(s) | 1 / √x | |
89 | fcbrt(s) | ∛x | |
90 | frecip(s) | 1 / x | |
91 | fexp2m1(s) | 2<sup>x</sup> - 1 | |
92 | flog2p1(s) | log<sub>2</sub> (x + 1) | |
93 | fexp2(s) | 2<sup>x</sup> | |
94 | flog2(s) | log<sub>2</sub> x | |
95 | fexpm1(s) | e<sup>x</sup> - 1 | |
96 | flogp1(s) | log<sub>e</sub> (x + 1) | |
97 | fexp(s) | e<sup>x</sup> | |
98 | flog(s) | log<sub>e</sub> x | |
99 | fexp10m1(s)| 10<sup>x</sup> - 1 | |
100 | flog10p1(s)| log<sub>10</sub> (x + 1) | |
101 | fexp10(s) | 10<sup>x</sup> | |
102 | flog10(s) | log<sub>10</sub> x | |
104 # DRAFT List of 1-arg trigonometric opcodes
106 FIXME(programmerjake): reallocate
108 These are X-Form, and are identical in Special Registers Altered to `fsqrt`.
109 Recommended Major Opcode 63 for full-width and 59 for half-width (ending in s)
111 Special Registers Altered:
113 FPRF FR FI FX OX UX XX
117 | 0.5|6.10|11.15|16.20| 21..30 |31| name | Form |
118 | -- | -- | --- | --- | ---------- |--| ---- | ------- |
119 | NN |FRT | /// | FRB | 10xxx011xx |Rc| trigonometric | X-Form |
121 Recommended 10-bit XO with the low 5 LSBs 01101 to 01111:
123 | opcode | Description | Major 59 and 63 |
124 |-------------|--------------------------|------------------|
125 | fsin(s) | sin (radians) | 10010 01101 |
126 | fcos(s) | cos (radians) | 10011 01100 |
127 | ftan(s) | tan (radians) | 10011 01101 |
128 | fasin(s) | arcsin (radians) | 10010 01111 |
129 | facos(s) | arccos (radians) | 10011 01110 |
130 | fatan(s) | arctan (radians) | 10011 01111 |
131 | fsinpi(s) | sin(π * x) | 10000 01101 |
132 | fcospi(s) | cos(π * x) | 10001 01100 |
133 | ftanpi(s) | tan(π * x) | 10001 01101 |
134 | fasinpi(s) | arcsin(x) / π | 10000 01111 |
135 | facospi(s) | arccos(x) / π | 10001 01110 |
136 | fatanpi(s) | arctan(x) / π | 10001 01111 |
137 | fsinh(s) | hyperbolic sin | 10100 01101 |
138 | fcosh(s) | hyperbolic cos | 10101 01100 |
139 | ftanh(s) | hyperbolic tan | 10101 01101 |
140 | fasinh(s) | inverse hyperbolic sin | 10100 01111 |
141 | facosh(s) | inverse hyperbolic cos | 10101 01110 |
142 | fatanh(s) | inverse hyperbolic tan | 10101 01111 |