update 1-op transcendentals
[libreriscv.git] / rv_major_opcode_1010011.mdwn
1 # Summary FP Opcodes
2
3 This page aids and assists in the development of FP proposals,
4 by identifying and listing in full both publicly-known proposals
5 and the full brownfield encoding space available in the 0b010011
6 major opcode.
7
8 A primary critical use-case for extending FP is for 3D and supercomputing.
9
10 Publicly-known FP proposals:
11
12 * Zfrsqrt - Reciprocal SQRT <http://bugs.libre-riscv.org/show_bug.cgi?id=110>
13 * Zftrans - Transcendentals (FSIN, FCOS, FATAN, FPOW, FEXP, FLOG, FRCP)
14 <http://bugs.libre-riscv.org/show_bug.cgi?id=127>
15 * Extension of formats to cover FP16 (RISC-V ISA Manual Table 11.3 "fmt field")
16 * HI-half FP MV - <https://github.com/riscv/riscv-isa-manual/pull/301>
17 <https://groups.google.com/a/groups.riscv.org/forum/m/#!topic/isa-dev/kXgfFqgBv-c>
18 * (Add new entries here: Zextname - Description and URL)
19
20 [[!toc levels=2]]
21
22 # Main FP opcode 1010011 table
23
24 Notes:
25
26 * Proposed new encodings in **bold**.
27 * *Use funct5 sparingly!* - 2-operand functions only.
28 * Single-argument FP operations should go under one of the funct5 tables
29 * Both dual and single argument FP operations that do not require
30 "rounding mode" should go in one of the funct5 tables that already use
31 "funct3".
32 * Be careful not to use encoding space for which FP16 has already been
33 reserved.
34
35 [[!table data="""
36 31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function |
37 funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name |
38 5 | 2 | 5 | 5 | 3 | 5 | 7 | |
39 00000 | xx | rs2 | rs1 | rm | rd | 1010011 | FADD.xx |
40 00001 | xx | rs2 | rs1 | rm | rd | 1010011 | FSUB.xx |
41 00010 | xx | rs2 | rs1 | rm | rd | 1010011 | FMUL.xx |
42 00011 | xx | rs2 | rs1 | rm | rd | 1010011 | FDIV.xx |
43 00100 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
44 00101 | xx | rs2 | rs1 | yyy | rd | 1010011 | tb=00101 |
45 00110 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
46 00111 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
47 01000 | xx | rs2 | rs1 | yyy | rd | 1010011 | tb=01000 |
48 01001 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
49 01010 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
50 01011 | xx | xxxxx | rs1 | yyy | rd | 1010011 | tb=01011 |
51 01100 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
52 01101 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
53 01110 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
54 01111 | xx | rs2 | rs1 | yyy | rd | 1010011 | **FPOW.xx** |
55 10000 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
56 10001 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
57 10010 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
58 10011 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
59 10100 | xx | rs2 | rs1 | yyy | rd | 1010011 | tb=10100 |
60 10101 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
61 10110 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
62 10111 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
63 11000 | xx | xxxxx | rs1 | yyy | rd | 1010011 | tb=11000 |
64 11001 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
65 11010 | xx | xxxxx | rs1 | yyy | rd | 1010011 | tb=11010 |
66 11100 | xx | xxxxx | rs1 | 000 | rd | 1010011 | tb=11100 |
67 11101 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
68 11110 | xx | xxxxx | rs1 | 000 | rd | 1010011 | tb=11110 |
69 11111 | xx | rs2 | rs1 | yyy | rd | 1010011 | ? |
70 """]]
71
72 ## funct5 = 00000 - FADD
73
74 No brownfield encodings available.
75
76 ## funct5 = 00001 - FSUB
77
78 No brownfield encodings available.
79
80 ## funct5 = 00010 - FMUL
81
82 No brownfield encodings available.
83
84 ## funct5 = 00011 - FDIV
85
86 No brownfield encodings available.
87
88 ## funct5 = 00100 - unused
89
90 Brownfield encodings available.
91
92 ## funct5 = 00100
93
94 This table uses funct3 for encoding 2-operand FP operations
95
96 [[!table data="""
97 31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function |
98 funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name |
99 5 | 2 | 5 | 5 | 3 | 5 | 7 | |
100 00100 | xx | rs2 | rs1 | 000 | rd | 1010011 | FSGNJ.xx |
101 00100 | xx | rs2 | rs1 | 001 | rd | 1010011 | FSGNJN.xx |
102 00100 | xx | rs2 | rs1 | 010 | rd | 1010011 | FSGNJX.xx |
103 00100 | xx | rs2 | rs1 | 011 | rd | 1010011 | ?f3=011 |
104 00100 | xx | rs2 | rs1 | 100 | rd | 1010011 | ?f3=100 |
105 00100 | xx | rs2 | rs1 | 101 | rd | 1010011 | ?f3=101 |
106 00100 | xx | rs2 | rs1 | 110 | rd | 1010011 | ?f3=110 |
107 00100 | xx | rs2 | rs1 | 111 | rd | 1010011 | ?f3=111 |
108 """]]
109
110 ## funct5 = 00101
111
112 This table uses funct3 for encoding 2-operand FP operations where the result
113 register is a **floating-point** value.
114
115 [[!table data="""
116 31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function |
117 funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name |
118 5 | 2 | 5 | 5 | 3 | 5 | 7 | |
119 00101 | xx | rs2 | rs1 | 000 | rd | 1010011 | FMIN.S |
120 00101 | xx | rs2 | rs1 | 001 | rd | 1010011 | FMAX.S |
121 00101 | xx | rs2 | rs1 | 010 | rd | 1010011 | ?f3=010 |
122 00101 | xx | rs2 | rs1 | 011 | rd | 1010011 | ?f3=011 |
123 00101 | xx | rs2 | rs1 | 100 | rd | 1010011 | ?f3=100 |
124 00101 | xx | rs2 | rs1 | 101 | rd | 1010011 | ?f3=101 |
125 00101 | xx | rs2 | rs1 | 110 | rd | 1010011 | ?f3=110 |
126 00101 | xx | rs2 | rs1 | 111 | rd | 1010011 | ?f3=111 |
127 """]]
128
129 ## funct5 = 00110 - unused
130
131 Brownfield encodings available.
132
133 ## funct5 = 00111 - unused
134
135 Brownfield encodings available.
136
137 ## funct5 = 01000
138
139 This table uses rs2 for encoding 1-operand FP operations, using
140 funct3 to specify the "rounding" mode
141
142 Notes:
143
144 * FP16 logically deduced from fmt field encoding (bits 25-26)
145
146 [[!table data="""
147 31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function |
148 funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name |
149 5 | 2 | 5 | 5 | 3 | 5 | 7 | |
150 01000 | 00 | 00000 | rs1 | rm | rd | 1010011 | ???????? |
151 01000 | 00 | 00001 | rs1 | rm | rd | 1010011 | FCVT.S.D |
152 01000 | 00 | 00010 | rs1 | rm | rd | 1010011 | **FCVT.S.H**|
153 01000 | 00 | 00011 | rs1 | rm | rd | 1010011 | FCVT.S.Q |
154 01000 | 00 | xxxxx | rs1 | rm | rd | 1010011 | rs2? |
155 ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- |
156 01000 | 01 | 00000 | rs1 | rm | rd | 1010011 | FCVT.D.S |
157 01000 | 01 | 00001 | rs1 | rm | rd | 1010011 | ???????? |
158 01000 | 01 | 00010 | rs1 | rm | rd | 1010011 | **FCVT.D.H**|
159 01000 | 01 | 00011 | rs1 | rm | rd | 1010011 | FCVT.D.Q |
160 01000 | 01 | xxxxx | rs1 | rm | rd | 1010011 | rs2? |
161 ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- |
162 01000 | 10 | 00000 | rs1 | rm | rd | 1010011 | FCVT.H.S |
163 01000 | 10 | 00001 | rs1 | rm | rd | 1010011 | **FCVT.H.D**|
164 01000 | 10 | 00010 | rs1 | rm | rd | 1010011 | ???????? |
165 01000 | 10 | 00011 | rs1 | rm | rd | 1010011 | FCVT.H.Q |
166 01000 | 10 | xxxxx | rs1 | rm | rd | 1010011 | rs2? |
167 ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- |
168 01000 | 11 | 00000 | rs1 | rm | rd | 1010011 | FCVT.Q.S |
169 01000 | 11 | 00001 | rs1 | rm | rd | 1010011 | FCVT.Q.D |
170 01000 | 11 | 00010 | rs1 | rm | rd | 1010011 | **FCVT.Q.H**|
171 01000 | 11 | 00011 | rs1 | rm | rd | 1010011 | ???????? |
172 01000 | 11 | xxxxx | rs1 | rm | rd | 1010011 | rs2? |
173 """]]
174
175 ## funct5 = 01001 - unused
176
177 Brownfield encodings available.
178
179 ## funct5 = 01010 - unused
180
181 Brownfield encodings available.
182
183 ## funct5 = 01011 - 1-op Transcendentals <a name="transcendentals_1op"></a>
184
185 This table uses rs2 for encoding 1-operand FP operations, using
186 funct3 to specify the "rounding" mode
187
188 [[!table data="""
189 31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function |
190 funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name |
191 5 | 2 | 5 | 5 | 3 | 5 | 7 | |
192 01011 | xx | 00000 | rs1 | rm | rd | 1010011 | FSQRT.xx |
193 01011 | xx | 00001 | rs1 | rm | rd | 1010011 | **FRSQRT.xx** |
194 01011 | xx | 00010 | rs1 | rm | rd | 1010011 | **FRCP.xx** |
195 01011 | xx | 00011 | rs1 | rm | rd | 1010011 | **CBRT.xx** |
196 01011 | xx | 00100 | rs1 | rm | rd | 1010011 | ? |
197 01011 | xx | 00101 | rs1 | rm | rd | 1010011 | ? |
198 01011 | xx | 00110 | rs1 | rm | rd | 1010011 | ? |
199 01011 | xx | 00111 | rs1 | rm | rd | 1010011 | ? |
200 01011 | xx | 01000 | rs1 | rm | rd | 1010011 | **FEXP2.xx** |
201 01011 | xx | 01001 | rs1 | rm | rd | 1010011 | **FLOG2.xx** |
202 01011 | xx | 01010 | rs1 | rm | rd | 1010011 | **FEXPM1.xx** |
203 01011 | xx | 01011 | rs1 | rm | rd | 1010011 | **FLOGP1.xx** |
204 01011 | xx | 01100 | rs1 | rm | rd | 1010011 | **FEXP.xx** |
205 01011 | xx | 01101 | rs1 | rm | rd | 1010011 | **FLOG.xx** |
206 01011 | xx | 01110 | rs1 | rm | rd | 1010011 | **FEXP10.xx** |
207 01011 | xx | 01111 | rs1 | rm | rd | 1010011 | **FLOG10.xx** |
208 01011 | xx | 10000 | rs1 | rm | rd | 1010011 | **FSIN.xx** |
209 01011 | xx | 10001 | rs1 | rm | rd | 1010011 | **FCOS.xx** |
210 01011 | xx | 10010 | rs1 | rm | rd | 1010011 | **FTAN.xx** |
211 01011 | xx | 10011 | rs1 | rm | rd | 1010011 | **FTAN2.xx** |
212 01011 | xx | 10100 | rs1 | rm | rd | 1010011 | **FSINPI.xx** |
213 01011 | xx | 10101 | rs1 | rm | rd | 1010011 | **FCOSPI.xx** |
214 01011 | xx | 10110 | rs1 | rm | rd | 1010011 | **FTANPI.xx** |
215 01011 | xx | 10111 | rs1 | rm | rd | 1010011 | **FATAN2PI.xx**|
216 01011 | xx | 11000 | rs1 | rm | rd | 1010011 | **FSINH.xx** |
217 01011 | xx | 11001 | rs1 | rm | rd | 1010011 | **FCOSH.xx** |
218 01011 | xx | 11010 | rs1 | rm | rd | 1010011 | **FTANH.xx** |
219 01011 | xx | 11011 | rs1 | rm | rd | 1010011 | ? |
220 01011 | xx | 11100 | rs1 | rm | rd | 1010011 | **FASINH.xx** |
221 01011 | xx | 11101 | rs1 | rm | rd | 1010011 | **FACOSH.xx** |
222 01011 | xx | 11110 | rs1 | rm | rd | 1010011 | **FATANH.xx** |
223 01011 | xx | 11111 | rs1 | rm | rd | 1010011 | ? |
224 """]]
225
226 ## funct5 = 01100 - unused
227
228 Brownfield encodings available.
229
230 ## funct5 = 01101 - unused
231
232 Brownfield encodings available.
233
234 ## funct5 = 01110 - unused
235
236 Brownfield encodings available.
237
238 ## funct5 = 01111 - **FPOW**
239
240 Proposed for Zftrans - FPOW: "FP rs2 to the power of rs1"
241
242 ## funct5 = 10000 - unused
243
244 Brownfield encodings available.
245
246 ## funct5 = 10001 - unused
247
248 Brownfield encodings available.
249
250 ## funct5 = 10010 - unused
251
252 Brownfield encodings available.
253
254 ## funct5 = 10011 - unused
255
256 Brownfield encodings available.
257
258 ## funct5 = 10100
259
260 This table uses funct3 for encoding 2-operand FP "comparison" operations
261 where the result register is an **integer**
262
263 Notes:
264
265 * FNE missing?
266
267 [[!table data="""
268 31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function |
269 funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name |
270 5 | 2 | 5 | 5 | 3 | 5 | 7 | |
271 10100 | xx | rs2 | rs1 | 000 | rd | 1010011 | FLE.xx |
272 10100 | xx | rs2 | rs1 | 001 | rd | 1010011 | FLT.xx |
273 10100 | xx | rs2 | rs1 | 010 | rd | 1010011 | FEQ.xx |
274 10100 | xx | rs2 | rs1 | 011 | rd | 1010011 | ?f3=011 |
275 10100 | xx | rs2 | rs1 | 100 | rd | 1010011 | ?f3=100 |
276 10100 | xx | rs2 | rs1 | 101 | rd | 1010011 | ?f3=101 |
277 10100 | xx | rs2 | rs1 | 110 | rd | 1010011 | ?f3=110 |
278 10100 | xx | rs2 | rs1 | 111 | rd | 1010011 | ?f3=111 |
279 """]]
280
281 ## funct5 = 10101 - unused
282
283 Brownfield encodings available.
284
285 ## funct5 = 10110 - unused
286
287 Brownfield encodings available.
288
289 ## funct5 = 10111 - unused
290
291 Brownfield encodings available.
292
293 ## funct5 = 11000
294
295 This table uses rs2 for encoding 1-operand FP operations, using
296 funct3 to specify the "rounding" mode
297
298 Notes:
299
300 * FP16 logically deduced from fmt field (bits 25-26)
301
302 [[!table data="""
303 31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function |
304 funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name |
305 5 | 2 | 5 | 5 | 3 | 5 | 7 | |
306 11000 | 00 | 00000 | rs1 | rm | rd | 1010011 | FCVT.W.S |
307 11000 | 00 | 00001 | rs1 | rm | rd | 1010011 | FCVT.WU.S |
308 11000 | 00 | 00010 | rs1 | rm | rd | 1010011 | FCVT.L.S |
309 11000 | 00 | 00011 | rs1 | rm | rd | 1010011 | FCVT.LU.S |
310 11000 | 00 | xxxxx | rs1 | rm | rd | 1010011 | rs2? |
311 ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- |
312 11000 | 01 | 00000 | rs1 | rm | rd | 1010011 | FCVT.W.D |
313 11000 | 01 | 00001 | rs1 | rm | rd | 1010011 | FCVT.WU.D |
314 11000 | 01 | 00010 | rs1 | rm | rd | 1010011 | FCVT.L.D |
315 11000 | 01 | 00011 | rs1 | rm | rd | 1010011 | FCVT.LU.D |
316 11000 | 01 | xxxxx | rs1 | rm | rd | 1010011 | rs2? |
317 ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- |
318 11000 | 10 | 00000 | rs1 | rm | rd | 1010011 |**FCVT.W.H** |
319 11000 | 10 | 00001 | rs1 | rm | rd | 1010011 |**FCVT.WU.H**|
320 11000 | 10 | 00010 | rs1 | rm | rd | 1010011 |**FCVT.L.H** |
321 11000 | 10 | 00011 | rs1 | rm | rd | 1010011 |**FCVT.LU.H**|
322 11000 | 10 | xxxxx | rs1 | rm | rd | 1010011 | rs2? |
323 ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- |
324 11000 | 11 | 00000 | rs1 | rm | rd | 1010011 | FCVT.W.Q |
325 11000 | 11 | 00001 | rs1 | rm | rd | 1010011 | FCVT.WU.Q |
326 11000 | 11 | 00010 | rs1 | rm | rd | 1010011 | FCVT.L.Q |
327 11000 | 11 | 00011 | rs1 | rm | rd | 1010011 | FCVT.LU.Q |
328 11000 | 11 | xxxxx | rs1 | rm | rd | 1010011 | rs2? |
329 """]]
330
331 ## funct5 = 11001 - unused
332
333 Brownfield encodings available.
334
335 ## funct5 = 11010
336
337 This table uses rs2 for encoding 1-operand FP operations, using
338 funct3 to specify the "rounding" mode
339
340 * FP16 logically deduced from fmt field (bits 25-26)
341
342 [[!table data="""
343 31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function |
344 funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name |
345 5 | 2 | 5 | 5 | 3 | 5 | 7 | |
346 11010 | 00 | 00000 | rs1 | rm | rd | 1010011 | FCVT.S.W |
347 11010 | 00 | 00001 | rs1 | rm | rd | 1010011 | FCVT.S.WU |
348 11010 | 00 | 00010 | rs1 | rm | rd | 1010011 | FCVT.S.L |
349 11010 | 00 | 00011 | rs1 | rm | rd | 1010011 | FCVT.S.LU |
350 11010 | 00 | xxxxx | rs1 | rm | rd | 1010011 | rs2? |
351 ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- |
352 11010 | 01 | 00000 | rs1 | rm | rd | 1010011 | FCVT.D.W |
353 11010 | 01 | 00001 | rs1 | rm | rd | 1010011 | FCVT.D.WU |
354 11010 | 01 | 00010 | rs1 | rm | rd | 1010011 | FCVT.D.L |
355 11010 | 01 | 00011 | rs1 | rm | rd | 1010011 | FCVT.D.LU |
356 11010 | 01 | xxxxx | rs1 | rm | rd | 1010011 | rs2? |
357 ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- |
358 11010 | 10 | 00000 | rs1 | rm | rd | 1010011 |**FCVT.H.W** |
359 11010 | 10 | 00001 | rs1 | rm | rd | 1010011 |**FCVT.H.WU**|
360 11010 | 10 | 00010 | rs1 | rm | rd | 1010011 |**FCVT.H.L** |
361 11010 | 10 | 00011 | rs1 | rm | rd | 1010011 |**FCVT.H.LU**|
362 11010 | 10 | xxxxx | rs1 | rm | rd | 1010011 | rs2? |
363 ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- |
364 11010 | 11 | 00000 | rs1 | rm | rd | 1010011 | FCVT.Q.W |
365 11010 | 11 | 00001 | rs1 | rm | rd | 1010011 | FCVT.Q.WU |
366 11010 | 11 | 00010 | rs1 | rm | rd | 1010011 | FCVT.Q.L |
367 11010 | 11 | 00011 | rs1 | rm | rd | 1010011 | FCVT.Q.LU |
368 11010 | 11 | xxxxx | rs1 | rm | rd | 1010011 | rs2? |
369 """]]
370
371 ## funct5 = 11100
372
373 This table uses *both* rs2 *and* funct3 for encoding 1-operand FP operations.
374
375 Notes:
376
377 * FMV.X.Q is missing (alias of FMVH.X.D if it existed)
378 * FP16 logically deduced from fmt field (bits 25-26)
379 * FMVH.X.HW (half-word) missing?
380
381 [[!table data="""
382 31..27| 26..25| 24..20 |19..15|14...12| 11..7 | 6....0 | function |
383 funct5| SDHQ | rs2 | rs1 |funct3 | rd | opcode | name |
384 5 | 2 | 5 | 5 | 3 | 5 | 7 | |
385 11100 | 00 | 00000 | rs1 | 000 | rd | 1010011 | FMV.X.W |
386 11100 | 00 | 00000 | rs1 | 001 | rd | 1010011 | FCLASS.S |
387 11100 | 00 | xxxxx | rs1 | yyy | rd | 1010011 | rs2? f3? |
388 ------| ----- | ----- | -----| ----- | ----- | ------- | -------- |
389 11100 | 01 | 00000 | rs1 | 000 | rd | 1010011 | FMV.X.D **FMVH.X.W** |
390 11100 | 01 | 00000 | rs1 | 001 | rd | 1010011 | FCLASS.D |
391 11100 | 01 | xxxxx | rs1 | yyy | rd | 1010011 | rs2? f3? |
392 ------| ----- | ----- | -----| ----- | ----- | ------- | -------- |
393 11100 | 10 | 00000 | rs1 | 000 | rd | 1010011 |**FMV.X.H** |
394 11100 | 10 | 00000 | rs1 | 001 | rd | 1010011 |**FCLASS.H** |
395 11100 | 10 | xxxxx | rs1 | yyy | rd | 1010011 | rs2? f3? |
396 ------| ----- | ----- | -----| ----- | ----- | ------- | -------- |
397 11100 | 11 | 00000 | rs1 | 000 | rd | 1010011 | **FMVH.X.D** |
398 11100 | 11 | 00000 | rs1 | 001 | rd | 1010011 | FCLASS.Q |
399 11100 | xx | xxxxx | rs1 | yyy | rd | 1010011 | rs2? f3? |
400 """]]
401
402 ## funct5 = 11101 - unused
403
404 Brownfield encodings available.
405
406 ## funct5 = 11110
407
408 This table uses *both* rs2 *and* funct3 for encoding 1-operand FP operations.
409
410 Notes:
411
412 * FMV.Q.X is missing (as is FMVH.D.X)
413 * FMVH.W.X is missing (alias of FMV.D.X)
414 * FP16 logically deduced from fmt field (bits 25-26)
415 * FMVH.HW.X (half-word) missing?
416
417 [[!table data="""
418 31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function |
419 funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name |
420 5 | 2 | 5 | 5 | 3 | 5 | 7 | |
421 11110 | 00 | 00000 | rs1 | 000 | rd | 1010011 | FMV.W.X |
422 11110 | 00 | xxxxx | rs1 | yyy | rd | 1010011 | rs2? f3? |
423 ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- |
424 11110 | 01 | 00000 | rs1 | 000 | rd | 1010011 | FMV.D.X |
425 11110 | 01 | xxxxx | rs1 | yyy | rd | 1010011 | rs2? f3? |
426 ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- |
427 11110 | 10 | 00000 | rs1 | 000 | rd | 1010011 |**FMV.H.X** |
428 11110 | 10 | xxxxx | rs1 | yyy | rd | 1010011 | rs2? f3? |
429 ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- |
430 11110 | 11 | 00000 | rs1 | 000 | rd | 1010011 | ? |
431 11110 | 11 | xxxxx | rs1 | yyy | rd | 1010011 | rs2? f3? |
432 """]]
433
434 ## funct5 = 11111 - unused
435
436 Brownfield encodings available.
437
438 ## funct5 = ????? (table template)
439
440 This table acts as a cut/paste template for creating brownfield encodings
441
442 [[!table data="""
443 31..27 | 26..25 | 24..20 |19..15| 14...12| 11..7 | 6....0 | function |
444 funct5 | SDHQ | rs2 | rs1 | funct3 | rd | opcode | name |
445 5 | 2 | 5 | 5 | 3 | 5 | 7 | |
446 ------ | ----- | ----- | -----| ----- | ----- | ------- | -------- |
447 """]]
448