make linebreaks in tables look good in both html and latex
[libreriscv.git] / openpower / power_trans_ops.mdwn
1 # Opcode Tables
2
3 ## PO=59 XO=10--011--
4
5 Power ISA v3.1B opcodes extracted from Power ISA v3.1B Appendix D Table 23 sheet 2 of 4 page 1391
6
7 Parenthesized entries are not part of fptrans.
8
9 <!-- <template> is used to make html ignore what's inside it,
10 needed since pandoc conversion to latex ignores <br> tags-->
11
12 | XO LSB half &#x2192;<br> XO MSB half &#x2193; | 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) |
22
23 ## PO=63 XO=10--011--
24
25 Power ISA v3.1B opcodes extracted from Power ISA v3.1B Appendix D Table 25 sheet 2 of 4 page 1399
26
27 | XO LSB half &#x2192; <br/> XO MSB half &#x2193; | 01100 | 01101 | 01110 | 01111 |
28 |-------------------------------------------------|-------|-------|-------|-------|
29 | 10000 | | | | |
30 | 10001 | | | | |
31 | 10010 | | | | |
32 | 10011 | | | | |
33 | 10100 | | | | |
34 | 10101 | | | | |
35 | 10110 | | | | |
36 | 10111 | | | | |
37
38 # DRAFT List of 2-arg opcodes
39
40 FIXME(programmerjake): reallocate and convert to X-FORM
41
42 These are X-Form, recommended Major Opcode 63 for full-width
43 and 59 for half-width (ending in s).
44
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 |
48
49 As shown in Power ISA 3.1 Book III Appendix D Table 28 p1190
50 and Table 23 p1368,
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.
56
57 | opcode | Description | Major 59 and 63 |
58 |------------|-----------------------------------------|-----------------|
59 | fatan2(s) | atan2 arc tangent | 10010 01110 |
60 | fatan2pi(s)| atan2 arc tangent / &pi; | 10000 01110 |
61 | fpow(s) | x<sup>y</sup> | |
62 | fpown(s) | x<sup>n</sup> (n &in; &#x2124;) | |
63 | fpowr(s) | x<sup>y</sup> (x >= 0) | |
64 | frootn(s) | <sup>n</sup>&#x221A;x (n &in; &#x2124;) | |
65 | fhypot(s) | &#x221A;(x<sup>2</sup> + y<sup>2</sup>) | 10100 01110 |
66
67 # DRAFT List of 1-arg transcendental opcodes
68
69 FIXME(programmerjake): reallocate
70
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).
73
74 Special Registers Altered:
75
76 FPRF FR FI FX OX UX XX
77 VXSNAN VXIMZ VXZDZ
78 CR1 (if Rc=1)
79
80 | 0.5|6.10|11.15|16.20| 21..30 |31| name | Form |
81 | -- | -- | --- | --- | ---------- |--| ---- | ------- |
82 | NN |FRT | /// | FRB | 10xxx011xx |Rc| transcendental | X-Form |
83
84 Recommended 10-bit XO with the low 5 LSBs 01100:
85
86 | opcode | Description | Major 59 and 63 |
87 |------------|--------------------------|-----------------|
88 | frsqrt(s) | 1 / &#x221A;x | |
89 | fcbrt(s) | &#x221B;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 | |
103
104 # DRAFT List of 1-arg trigonometric opcodes
105
106 FIXME(programmerjake): reallocate
107
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)
110
111 Special Registers Altered:
112
113 FPRF FR FI FX OX UX XX
114 VXSNAN VXIMZ VXZDZ
115 CR1 (if Rc=1)
116
117 | 0.5|6.10|11.15|16.20| 21..30 |31| name | Form |
118 | -- | -- | --- | --- | ---------- |--| ---- | ------- |
119 | NN |FRT | /// | FRB | 10xxx011xx |Rc| trigonometric | X-Form |
120
121 Recommended 10-bit XO with the low 5 LSBs 01101 to 01111:
122
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(&pi; * x) | 10000 01101 |
132 | fcospi(s) | cos(&pi; * x) | 10001 01100 |
133 | ftanpi(s) | tan(&pi; * x) | 10001 01101 |
134 | fasinpi(s) | arcsin(x) / &pi; | 10000 01111 |
135 | facospi(s) | arccos(x) / &pi; | 10001 01110 |
136 | fatanpi(s) | arctan(x) / &pi; | 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 |