add category descriptions
[libreriscv.git] / simple_v_extension / opcodes.mdwn
1 # SimpleV Instruction Categorisation
2
3 Based on information from Michael Clark's riscv-meta opcodes table, this
4 page categorises and identifies the type of parallelism that SimpleV
5 indirectly adds on each RISC-V **standard** opcode. These are note-form:
6 see [[specification]] for full details.
7
8 * **-** no change of behaviour takes place: operation remains
9 **completely scalar** as an **unmodified**, unaugmented standard RISC-V
10 opcode, even if it has registers.
11 * **sv** - a standard contiguous (optionally predicated, optionally
12 indirected) multi-register operation where the predication register
13 to be used for the sequence of contiguous operations is taken from the
14 **destination** register's predication lookup entry.
15 * **2v** - a standard contiguous (optionally twin-predicated, optionally
16 indirected) twin-register operation (distinct source and destination)
17 where either or both of source or destination may be redirected,
18 vectorised, or **independently** predicated. This behaviour
19 covers the *entire* MV, VSPLAT, VINSERT, VREDUCE, VSCATTER, VGATHER
20 paradigm.
21 * **vld** - a standard contiguous (optionally twin-predicated, optionally
22 indirected) multi-register load operation where either or both of
23 destination register or load-from-address register may be redirected,
24 vectorised or **independently** predicated (LD.X style functionality).
25 (*Note: Vector "Unit Stride" and "Constant Stride" may be emulated by
26 pre-prepping a contiguous block of load-from-address registers with
27 the appropriate address offsets*)
28 * **vst** - a matching multi-register store operation with orthogonal
29 functionality to **vld**.
30 * **VLU** - a "Unit Stride" variant of **vld** where instead of the
31 source-address register number being (optionally) incremented
32 (and redirected, and predicated) it is the **immediate offset**
33 that is incremented (by the element width of the **source** register)
34 * **VSU** - a similarly "Unit Strided" variant of **vst**.
35 * **VBR** - a standard branch operation (optionally predicated, optionally
36 indirected) multi-register operation where the (optional) predication for the
37 compare is taken from the destination register, and where (optionally)
38 if the results of the multi-comparison are to be recorded, the **source**
39 register's predication table entry is used as the means to specify
40 (in a bitfield format that is directly compatible for follow-up use as a
41 predicate) the register in which the comparison results are stored.
42 On completion of all compares, if the tests carried out succeeded
43 (de-predicated compares not being included in this assessment, evidently),
44 the branch operation is carried out.
45
46 # RV32I/RV64I/RV128I "RV32I/RV64I/RV128I Base Integer Instruction Set"
47
48 | (23..18) | (17..12) | (11..6) | (5...0) | |
49 | -------- | -------- | ------- | ------- | |
50 |auipc | rd oimm20 | u+o | rv32i rv64i rv128i | - |
51 |jal | rd jimm20 | uj | rv32i rv64i rv128i | - |
52 |jalr | rd rs1 oimm12 | i+o | rv32i rv64i rv128i | - |
53 |fence | | r·f | rv32i rv64i rv128i | - |
54 |fence.i | | none | rv32i rv64i rv128i | - |
55 |lui | rd imm20 | u | rv32i rv64i rv128i | sv |
56 |beq | rs1 rs2 sbimm12 | sb | rv32i rv64i rv128i | VBR |
57 |bne | rs1 rs2 sbimm12 | sb | rv32i rv64i rv128i | VBR |
58 |blt | rs1 rs2 sbimm12 | sb | rv32i rv64i rv128i | VBR |
59 |bge | rs1 rs2 sbimm12 | sb | rv32i rv64i rv128i | VBR |
60 |bltu | rs1 rs2 sbimm12 | sb | rv32i rv64i rv128i | VBR |
61 |bgeu | rs1 rs2 sbimm12 | sb | rv32i rv64i rv128i | VBR |
62 |lb | rd rs1 oimm12 | i+l | rv32i rv64i rv128i | vld |
63 |lh | rd rs1 oimm12 | i+l | rv32i rv64i rv128i | vld |
64 |lw | rd rs1 oimm12 | i+l | rv32i rv64i rv128i | vld |
65 |lbu | rd rs1 oimm12 | i+l | rv32i rv64i rv128i | vld |
66 |lhu | rd rs1 oimm12 | i+l | rv32i rv64i rv128i | vld |
67 |lwu | rd rs1 oimm12 | i+l | rv64i rv128i | vld |
68 |ld | rd rs1 oimm12 | i+l | rv64i rv128i | vld |
69 |ldu | rd rs1 oimm12 | i+l | rv128i | vld |
70 |lq | rd rs1 oimm12 | i+l | rv128i | vld |
71 |sb | rs1 rs2 simm12 | s | rv32i rv64i rv128i | vst |
72 |sh | rs1 rs2 simm12 | s | rv32i rv64i rv128i | vst |
73 |sw | rs1 rs2 simm12 | s | rv32i rv64i rv128i | vst |
74 |sd | rs1 rs2 simm12 | s | rv64i rv128i | vst |
75 |sq | rs1 rs2 simm12 | s | rv128i | vst |
76 |addi | rd rs1 imm12 | i | rv32i rv64i rv128i | sv |
77 |slti | rd rs1 imm12 | i | rv32i rv64i rv128i | sv |
78 |sltiu | rd rs1 imm12 | i | rv32i rv64i rv128i | sv |
79 |xori | rd rs1 imm12 | i | rv32i rv64i rv128i | sv |
80 |ori | rd rs1 imm12 | i | rv32i rv64i rv128i | sv |
81 |andi | rd rs1 imm12 | i | rv32i rv64i rv128i | sv |
82 |slli | rd rs1 shamt5 | i·sh5 | rv32i | sv |
83 |srli | rd rs1 shamt5 | i·sh5 | rv32i | sv |
84 |srai | rd rs1 shamt5 | i·sh5 | rv32i | sv |
85 |add | rd rs1 rs2 | r | rv32i rv64i rv128i | sv |
86 |sub | rd rs1 rs2 | r | rv32i rv64i rv128i | sv |
87 |sll | rd rs1 rs2 | r | rv32i rv64i rv128i | sv |
88 |slt | rd rs1 rs2 | r | rv32i rv64i rv128i | sv |
89 |sltu | rd rs1 rs2 | r | rv32i rv64i rv128i | sv |
90 |xor | rd rs1 rs2 | r | rv32i rv64i rv128i | sv |
91 |srl | rd rs1 rs2 | r | rv32i rv64i rv128i | sv |
92 |sra | rd rs1 rs2 | r | rv32i rv64i rv128i | sv |
93 |or | rd rs1 rs2 | r | rv32i rv64i rv128i | sv |
94 |and | rd rs1 rs2 | r | rv32i rv64i rv128i | sv |
95 |slli | rd rs1 shamt6 | i·sh6 | rv64i | sv |
96 |srli | rd rs1 shamt6 | i·sh6 | rv64i | sv |
97 |srai | rd rs1 shamt6 | i·sh6 | rv64i | sv |
98 |addiw | rd rs1 imm12 | i | rv64i rv128i | sv |
99 |slliw | rd rs1 shamt5 | i·sh5 | rv64i rv128i | sv |
100 |srliw | rd rs1 shamt5 | i·sh5 | rv64i rv128i | sv |
101 |sraiw | rd rs1 shamt5 | i·sh5 | rv64i rv128i | sv |
102 |addw | rd rs1 rs2 | r | rv64i rv128i | sv |
103 |subw | rd rs1 rs2 | r | rv64i rv128i | sv |
104 |sllw | rd rs1 rs2 | r | rv64i rv128i | sv |
105 |srlw | rd rs1 rs2 | r | rv64i rv128i | sv |
106 |sraw | rd rs1 rs2 | r | rv64i rv128i | sv |
107 |slli | rd rs1 shamt7 | i·sh7 | rv128i | sv |
108 |srli | rd rs1 shamt7 | i·sh7 | rv128i | sv |
109 |srai | rd rs1 shamt7 | i·sh7 | rv128i | sv |
110 |addid | rd rs1 imm12 | i | rv128i | sv |
111 |sllid | rd rs1 shamt6 | i·sh6 | rv128i | sv |
112 |srlid | rd rs1 shamt6 | i·sh6 | rv128i | sv |
113 |sraid | rd rs1 shamt6 | i·sh6 | rv128i | sv |
114 |addd | rd rs1 rs2 | r | rv128i | sv |
115 |subd | rd rs1 rs2 | r | rv128i | sv |
116 |slld | rd rs1 rs2 | r | rv128i | sv |
117 |srld | rd rs1 rs2 | r | rv128i | sv |
118 |srad | rd rs1 rs2 | r | rv128i | sv |
119
120 # RV32M "RV32M Standard Extension for Integer Multiply and Divide"
121
122 | (23..18) | (17..12) | (11..6) | (5...0) | |
123 | -------- | -------- | ------- | ------- | |
124 |mul | rd rs1 rs2 | r | rv32m rv64m rv128m | sv |
125 |mulh | rd rs1 rs2 | r | rv32m rv64m rv128m | sv |
126 |mulhsu | rd rs1 rs2 | r | rv32m rv64m rv128m | sv |
127 |mulhu | rd rs1 rs2 | r | rv32m rv64m rv128m | sv |
128 |div | rd rs1 rs2 | r | rv32m rv64m rv128m | sv |
129 |divu | rd rs1 rs2 | r | rv32m rv64m rv128m | sv |
130 |rem | rd rs1 rs2 | r | rv32m rv64m rv128m | sv |
131 |remu | rd rs1 rs2 | r | rv32m rv64m rv128m | sv |
132
133 # RV64M "RV64M Standard Extension for Integer Multiply and Divide (in addition to RV32M)"
134
135 | (23..18) | (17..12) | (11..6) | (5...0) | |
136 | -------- | -------- | ------- | ------- | |
137 |mulw | rd rs1 rs2 | r | rv64m rv128m | sv |
138 |divw | rd rs1 rs2 | r | rv64m rv128m | sv |
139 |divuw | rd rs1 rs2 | r | rv64m rv128m | sv |
140 |remw | rd rs1 rs2 | r | rv64m rv128m | sv |
141 |remuw | rd rs1 rs2 | r | rv64m rv128m | sv |
142
143 # RV128M "RV128M Standard Extension for Integer Multiply and Divide (in addition to RV64M)"
144
145 | (23..18) | (17..12) | (11..6) | (5...0) | |
146 | -------- | -------- | ------- | ------- | |
147 |muld | rd rs1 rs2 | r | rv128m | sv |
148 |divd | rd rs1 rs2 | r | rv128m | sv |
149 |divud | rd rs1 rs2 | r | rv128m | sv |
150 |remd | rd rs1 rs2 | r | rv128m | sv |
151 |remud | rd rs1 rs2 | r | rv128m | sv |
152
153 # RV32A "RV32A Standard Extension for Atomic Instructions"
154
155 | (23..18) | (17..12) | (11..6) | (5...0) | |
156 | -------- | -------- | ------- | ------- | |
157 |lr.w | rd rs1 | r·l | rv32a rv64a rv128a | - |
158 |sc.w | rd rs1 rs2 | r·a | rv32a rv64a rv128a | - |
159 |amoswap.w| rd rs1 rs2 | r·a | rv32a rv64a rv128a | sv |
160 |amoadd.w | rd rs1 rs2 | r·a | rv32a rv64a rv128a | sv |
161 |amoxor.w | rd rs1 rs2 | r·a | rv32a rv64a rv128a | sv |
162 |amoor.w | rd rs1 rs2 | r·a | rv32a rv64a rv128a | sv |
163 |amoand.w | rd rs1 rs2 | r·a | rv32a rv64a rv128a | sv |
164 |amomin.w | rd rs1 rs2 | r·a | rv32a rv64a rv128a | sv |
165 |amomax.w | rd rs1 rs2 | r·a | rv32a rv64a rv128a | sv |
166 |amominu.w| rd rs1 rs2 | r·a | rv32a rv64a rv128a | sv |
167 |amomaxu.w| rd rs1 rs2 | r·a | rv32a rv64a rv128a | sv |
168
169 # RV64A "RV64A Standard Extension for Atomic Instructions (in addition to RV32A)"
170
171 | (23..18) | (17..12) | (11..6) | (5...0) | |
172 | -------- | -------- | ------- | ------- | |
173 |lr.d | rd rs1 | r·l | rv64a rv128a | - |
174 |sc.d | rd rs1 rs2 | r·a | rv64a rv128a | - |
175 |amoswap.d| rd rs1 rs2 | r·a | rv64a rv128a | sv |
176 |amoadd.d | rd rs1 rs2 | r·a | rv64a rv128a | sv |
177 |amoxor.d | rd rs1 rs2 | r·a | rv64a rv128a | sv |
178 |amoor.d | rd rs1 rs2 | r·a | rv64a rv128a | sv |
179 |amoand.d | rd rs1 rs2 | r·a | rv64a rv128a | sv |
180 |amomin.d | rd rs1 rs2 | r·a | rv64a rv128a | sv |
181 |amomax.d | rd rs1 rs2 | r·a | rv64a rv128a | sv |
182 |amominu.d| rd rs1 rs2 | r·a | rv64a rv128a | sv |
183 |amomaxu.d| rd rs1 rs2 | r·a | rv64a rv128a | sv |
184
185 # RV128A "RV128A Standard Extension for Atomic Instructions (in addition to RV64A)"
186
187 | (23..18) | (17..12) | (11..6) | (5...0) | |
188 | -------- | -------- | ------- | ------- | |
189 |lr.q | rd rs1 | r·l | rv128a | - |
190 |sc.q | rd rs1 rs2 | r·a | rv128a | - |
191 |amoswap.q| rd rs1 rs2 | r·a | rv128a | sv |
192 |amoadd.q | rd rs1 rs2 | r·a | rv128a | sv |
193 |amoxor.q | rd rs1 rs2 | r·a | rv128a | sv |
194 |amoor.q | rd rs1 rs2 | r·a | rv128a | sv |
195 |amoand.q | rd rs1 rs2 | r·a | rv128a | sv |
196 |amomin.q | rd rs1 rs2 | r·a | rv128a | sv |
197 |amomax.q | rd rs1 rs2 | r·a | rv128a | sv |
198 |amominu.q| rd rs1 rs2 | r·a | rv128a | sv |
199 |amomaxu.q| rd rs1 rs2 | r·a | rv128a | sv |
200
201 # RV32S "RV32S Standard Extension for Supervisor-level Instructions"
202
203 | (23..18) | (17..12) | (11..6) | (5...0) | |
204 | -------- | -------- | ------- | ------- | |
205 |ecall | | none | rv32s rv64s rv128s | - |
206 |ebreak | | none | rv32s rv64s rv128s | - |
207 |uret | | none | rv32s rv64s rv128s | - |
208 |sret | | none | rv32s rv64s rv128s | - |
209 |hret | | none | rv32s rv64s rv128s | - |
210 |mret | | none | rv32s rv64s rv128s | - |
211 |dret | | none | rv32s rv64s rv128s | - |
212 |sfence.vm | rs1 | r+sf | rv32s rv64s rv128s | - |
213 |sfence.vma| rs1 rs2 | r+sfa | rv32s rv64s rv128s | - |
214 |wfi | | none | rv32s rv64s rv128s | - |
215 |csrrw | rd rs1 csr12 | i·csr | rv32s rv64s rv128s | ? |
216 |csrrs | rd rs1 csr12 | i·csr | rv32s rv64s rv128s | ? |
217 |csrrc | rd rs1 csr12 | i·csr | rv32s rv64s rv128s | ? |
218 |csrrwi | rd zimm csr12 | i·csr+i | rv32s rv64s rv128s | ? |
219 |csrrsi | rd zimm csr12 | i·csr+i | rv32s rv64s rv128s | ? |
220 |csrrci | rd zimm csr12 | i·csr+i | rv32s rv64s rv128s | ? |
221
222 # RV32F "RV32F Standard Extension for Single-Precision Floating-Point"
223
224 | (23..18) | (17..12) | (11..6) | (5...0) | |
225 | -------- | -------- | ------- | ------- | |
226 |flw | frd rs1 oimm12 | i+lf | rv32f rv64f rv128f | vld |
227 |fsw | rs1 frs2 simm12 | s+f | rv32f rv64f rv128f | vld |
228 |fmadd.s | frd frs1 frs2 frs3 rm | r4·m | rv32f rv64f rv128f | sv |
229 |fmsub.s | frd frs1 frs2 frs3 rm | r4·m | rv32f rv64f rv128f | sv |
230 |fnmsub.s | frd frs1 frs2 frs3 rm | r4·m | rv32f rv64f rv128f | sv |
231 |fnmadd.s | frd frs1 frs2 frs3 rm | r4·m | rv32f rv64f rv128f | sv |
232 |fadd.s | frd frs1 frs2 rm | r·m+3f | rv32f rv64f rv128f | sv |
233 |fsub.s | frd frs1 frs2 rm | r·m+3f | rv32f rv64f rv128f | sv |
234 |fmul.s | frd frs1 frs2 rm | r·m+3f | rv32f rv64f rv128f | sv |
235 |fdiv.s | frd frs1 frs2 rm | r·m+3f | rv32f rv64f rv128f | sv |
236 |fmin.s | frd frs1 frs2 | r+3f | rv32f rv64f rv128f | sv |
237 |fmax.s | frd frs1 frs2 | r+3f | rv32f rv64f rv128f | sv |
238 |fsqrt.s | frd frs1 rm | r·m+ff | rv32f rv64f rv128f | sv |
239 |fle.s | rd frs1 frs2 | r+rff | rv32f rv64f rv128f | sv |
240 |flt.s | rd frs1 frs2 | r+rff | rv32f rv64f rv128f | sv |
241 |feq.s | rd frs1 frs2 | r+rff | rv32f rv64f rv128f | sv |
242 |fclass.s | rd frs1 | r+rf | rv32f rv64f rv128f | sv |
243 |fsgnj.s | frd frs1 frs2 | r+3f | rv32f rv64f rv128f | 2v |
244 |fsgnjn.s | frd frs1 frs2 | r+3f | rv32f rv64f rv128f | 2v |
245 |fsgnjx.s | frd frs1 frs2 | r+3f | rv32f rv64f rv128f | 2v |
246 |fcvt.w.s | rd frs1 rm | r·m+rf | rv32f rv64f rv128f | 2v |
247 |fcvt.wu.s| rd frs1 rm | r·m+rf | rv32f rv64f rv128f | 2v |
248 |fcvt.s.w | frd rs1 rm | r·m+fr | rv32f rv64f rv128f | 2v |
249 |fcvt.s.wu| frd rs1 rm | r·m+fr | rv32f rv64f rv128f | 2v |
250 |fmv.x.s | rd frs1 | r+rf | rv32f rv64f rv128f | 2v |
251 |fmv.s.x | frd rs1 | r+fr | rv32f rv64f rv128f | 2v |
252
253 # RV64F "RV64F Standard Extension for Single-Precision Floating-Point (in addition to RV32F)"
254
255 | (23..18) | (17..12) | (11..6) | (5...0) | |
256 | -------- | -------- | ------- | ------- | |
257 |fcvt.l.s | rd frs1 rm | r·m+rf | rv64f rv128f | 2v |
258 |fcvt.lu.s| rd frs1 rm | r·m+rf | rv64f rv128f | 2v |
259 |fcvt.s.l | frd rs1 rm | r·m+fr | rv64f rv128f | 2v |
260 |fcvt.s.lu| frd rs1 rm | r·m+fr | rv64f rv128f | 2v |
261
262 # RV32D "RV32D Standard Extension for Double-Precision Floating-Point"
263
264 | (23..18) | (17..12) | (11..6) | (5...0) | |
265 | -------- | -------- | ------- | ------- | |
266 |fld | frd rs1 oimm12 | i+lf | rv32d rv64d rv128d | vld |
267 |fsd | rs1 frs2 simm12 | s+f | rv32d rv64d rv128d | vld |
268 |fmadd.d | frd frs1 frs2 frs3 rm | r4·m | rv32d rv64d rv128d | sv |
269 |fmsub.d | frd frs1 frs2 frs3 rm | r4·m | rv32d rv64d rv128d | sv |
270 |fnmsub.d | frd frs1 frs2 frs3 rm | r4·m | rv32d rv64d rv128d | sv |
271 |fnmadd.d | frd frs1 frs2 frs3 rm | r4·m | rv32d rv64d rv128d | sv |
272 |fadd.d | frd frs1 frs2 rm | r·m+3f | rv32d rv64d rv128d | sv |
273 |fsub.d | frd frs1 frs2 rm | r·m+3f | rv32d rv64d rv128d | sv |
274 |fmul.d | frd frs1 frs2 rm | r·m+3f | rv32d rv64d rv128d | sv |
275 |fdiv.d | frd frs1 frs2 rm | r·m+3f | rv32d rv64d rv128d | sv |
276 |fmin.d | frd frs1 frs2 | r+3f | rv32d rv64d rv128d | sv |
277 |fmax.d | frd frs1 frs2 | r+3f | rv32d rv64d rv128d | sv |
278 |fsqrt.d | frd frs1 rm | r·m+ff | rv32d rv64d rv128d | sv |
279 |fle.d | rd frs1 frs2 | r+rff | rv32d rv64d rv128d | sv |
280 |flt.d | rd frs1 frs2 | r+rff | rv32d rv64d rv128d | sv |
281 |feq.d | rd frs1 frs2 | r+rff | rv32d rv64d rv128d | sv |
282 |fclass.d | rd frs1 | r+rf | rv32d rv64d rv128d | sv |
283 |fsgnj.d | frd frs1 frs2 | r+3f | rv32d rv64d rv128d | 2v |
284 |fsgnjn.d | frd frs1 frs2 | r+3f | rv32d rv64d rv128d | 2v |
285 |fsgnjx.d | frd frs1 frs2 | r+3f | rv32d rv64d rv128d | 2v |
286 |fcvt.s.d | frd frs1 rm | r·m+ff | rv32d rv64d rv128d | 2v |
287 |fcvt.d.s | frd frs1 rm | r·m+ff | rv32d rv64d rv128d | 2v |
288 |fcvt.w.d | rd frs1 rm | r·m+rf | rv32d rv64d rv128d | 2v |
289 |fcvt.wu.d| rd frs1 rm | r·m+rf | rv32d rv64d rv128d | 2v |
290 |fcvt.d.w | frd rs1 rm | r·m+fr | rv32d rv64d rv128d | 2v |
291 |fcvt.d.wu| frd rs1 rm | r·m+fr | rv32d rv64d rv128d | 2v |
292
293 # RV64D "RV64D Standard Extension for Double-Precision Floating-Point (in addition to RV32D)"
294
295 | (23..18) | (17..12) | (11..6) | (5...0) | |
296 | -------- | -------- | ------- | ------- | |
297 |fcvt.l.d | rd frs1 rm | r·m+rf | rv64d rv128d | 2v |
298 |fcvt.lu.d| rd frs1 rm | r·m+rf | rv64d rv128d | 2v |
299 |fmv.x.d | rd frs1 | r+rf | rv64d rv128d | 2v |
300 |fcvt.d.l | frd rs1 rm | r·m+fr | rv64d rv128d | 2v |
301 |fcvt.d.lu| frd rs1 rm | r·m+fr | rv64d rv128d | 2v |
302 |fmv.d.x | frd rs1 | r+fr | rv64d rv128d | 2v |
303
304 # RV32Q "RV32Q Standard Extension for Quad-Precision Floating-Point"
305
306 | (23..18) | (17..12) | (11..6) | (5...0) | |
307 | -------- | -------- | ------- | ------- | |
308 |flq | frd rs1 oimm12 | i+lf | rv32q rv64q rv128q | vld |
309 |fsq | rs1 frs2 simm12 | s+f | rv32q rv64q rv128q | vst |
310 |fmadd.q | frd frs1 frs2 frs3 rm | r4·m | rv32q rv64q rv128q | sv |
311 |fmsub.q | frd frs1 frs2 frs3 rm | r4·m | rv32q rv64q rv128q | sv |
312 |fnmsub.q | frd frs1 frs2 frs3 rm | r4·m | rv32q rv64q rv128q | sv |
313 |fnmadd.q | frd frs1 frs2 frs3 rm | r4·m | rv32q rv64q rv128q | sv |
314 |fadd.q | frd frs1 frs2 rm | r·m+3f | rv32q rv64q rv128q | sv |
315 |fsub.q | frd frs1 frs2 rm | r·m+3f | rv32q rv64q rv128q | sv |
316 |fmul.q | frd frs1 frs2 rm | r·m+3f | rv32q rv64q rv128q | sv |
317 |fdiv.q | frd frs1 frs2 rm | r·m+3f | rv32q rv64q rv128q | sv |
318 |fmin.q | frd frs1 frs2 | r+3f | rv32q rv64q rv128q | sv |
319 |fmax.q | frd frs1 frs2 | r+3f | rv32q rv64q rv128q | sv |
320 |fsqrt.q | frd frs1 rm | r·m+ff | rv32q rv64q rv128q | sv |
321 |fle.q | rd frs1 frs2 | r+rff | rv32q rv64q rv128q | sv |
322 |flt.q | rd frs1 frs2 | r+rff | rv32q rv64q rv128q | sv |
323 |feq.q | rd frs1 frs2 | r+rff | rv32q rv64q rv128q | sv |
324 |fclass.q | rd frs1 | r+rf | rv32q rv64q rv128q | sv |
325 |fsgnj.q | frd frs1 frs2 | r+3f | rv32q rv64q rv128q | 2v |
326 |fsgnjn.q | frd frs1 frs2 | r+3f | rv32q rv64q rv128q | 2v |
327 |fsgnjx.q | frd frs1 frs2 | r+3f | rv32q rv64q rv128q | 2v |
328 |fcvt.s.q | frd frs1 rm | r·m+ff | rv32q rv64q rv128q | 2v |
329 |fcvt.q.s | frd frs1 rm | r·m+ff | rv32q rv64q rv128q | 2v |
330 |fcvt.d.q | frd frs1 rm | r·m+ff | rv32q rv64q rv128q | 2v |
331 |fcvt.q.d | frd frs1 rm | r·m+ff | rv32q rv64q rv128q | 2v |
332 |fcvt.w.q | rd frs1 rm | r·m+rf | rv32q rv64q rv128q | 2v |
333 |fcvt.wu.q| rd frs1 rm | r·m+rf | rv32q rv64q rv128q | 2v |
334 |fcvt.q.w | frd rs1 rm | r·m+fr | rv32q rv64q rv128q | 2v |
335 |fcvt.q.wu| frd rs1 rm | r·m+fr | rv32q rv64q rv128q | 2v |
336
337 # RV64Q "RV64Q Standard Extension for Quad-Precision Floating-Point (in addition to RV32Q)"
338
339 | (23..18) | (17..12) | (11..6) | (5...0) | |
340 | -------- | -------- | ------- | ------- | |
341 |fcvt.l.q | rd frs1 rm | r·m+rf | rv64q rv128q | 2v |
342 |fcvt.lu.q| rd frs1 rm | r·m+rf | rv64q rv128q | 2v |
343 |fcvt.q.l | frd rs1 rm | r·m+fr | rv64q rv128q | 2v |
344 |fcvt.q.lu| frd rs1 rm | r·m+fr | rv64q rv128q | 2v |
345
346 # RV128Q "RV128Q Standard Extension for Quadruple-Precision Floating-Point (in addition to RV64Q)"
347
348 | (23..18) | (17..12) | (11..6) | (5...0) | |
349 | -------- | -------- | ------- | ------- | |
350 |fmv.x.q | rd frs1 | r+rf | rv64q rv128q | 2v |
351 |fmv.q.x | frd rs1 | r+fr | rv64q rv128q | 2v |
352
353 # RV32C/RV64C/RV128C "RV32C/RV64C/RV128C Standard Extension for Compressed Instructions"
354
355 | (23..18) | (17..12) | (11..6) | (5...0) | |
356 | -------- | -------- | ------- | ------- | |
357 |c.addi4spn|crdq cimm4spn | ciw·4spn | rv32c rv64c | - |
358 |c.nop | | ci·none | rv32c rv64c | - |
359 |c.jal | cimmj | cj·jal | rv32c | - |
360 |c.j | cimmj | cj | rv32c rv64c | - |
361 |c.jr | crd0 crs1 | cr·jr | rv32c rv64c | - |
362 |c.ebreak | | ci·none | rv32c rv64c | - |
363 |c.jalr | crd0 crs1 | cr·jalr | rv32c rv64c | - |
364 |c.mv | crd crs2 | cr·mv | rv32c rv64c | 2v |
365 |c.fld | cfrdq crs1q cimmd | cl·ld+f | rv32c rv64c | vld |
366 |c.lw | crdq crs1q cimmw | cl·lw | rv32c rv64c | vld |
367 |c.flw | cfrdq crs1q cimmw | cl·lw+f | rv32c | vld |
368 |c.ld | crdq crs1q cimmd | cl·ld | rv64c | vld |
369 |c.lq | crdq crs1q cimmq | cl·lq | rv128c | vld |
370 |c.fsd | crs1q cfrs2q cimmd | cs·sd+f | rv32c rv64c | vst |
371 |c.sw | crs1q crs2q cimmw | cs·sw | rv32c rv64c | vst |
372 |c.fsw | crs1q cfrs2q cimmw | cs·sw+f | rv32c | vst |
373 |c.sd | crs1q crs2q cimmd | cs·sd | rv64c | vst |
374 |c.sq | crs1q crs2q cimmq | cs·sq | rv128c | vst |
375 |c.addi16sp|crs1rd cimm16sp | ci·16sp | rv32c rv64c | TODO: special-case in spike-sv (disable SV mode) |
376 |c.addi | crs1rd cnzimmi | ci | rv32c rv64c | sv |
377 |c.li | crs1rd cimmi | ci·li | rv32c rv64c | sv |
378 |c.lui | crd cimmui | ci·lui | rv32c rv64c | sv |
379 |c.srli | crs1rdq cimmsh5 | cb·sh5 | rv32c | sv |
380 |c.srai | crs1rdq cimmsh5 | cb·sh5 | rv32c | sv |
381 |c.slli | crs1rd cimmsh5 | ci·sh5 | rv32c | sv |
382 |c.andi | crs1rdq cnzimmi | cb·imm | rv32c rv64c | sv |
383 |c.sub | crs1rdq crs2q | cs | rv32c rv64c | sv |
384 |c.xor | crs1rdq crs2q | cs | rv32c rv64c | sv |
385 |c.or | crs1rdq crs2q | cs | rv32c rv64c | sv |
386 |c.and | crs1rdq crs2q | cs | rv32c rv64c | sv |
387 |c.subw | crs1rdq crs2q | cs | rv32c rv64c | sv |
388 |c.addw | crs1rdq crs2q | cs | rv32c rv64c | sv |
389 |c.add | crs1rd crs2 | cr | rv32c rv64c | sv |
390 |c.addiw | crs1rd cimmi | ci | rv64c | sv |
391 |c.srli | crs1rdq cimmsh6 | cb·sh6 | rv64c | sv |
392 |c.srai | crs1rdq cimmsh6 | cb·sh6 | rv64c | sv |
393 |c.slli | crs1rd cimmsh6 | ci·sh6 | rv64c | sv |
394 |c.beqz | crs1q cimmb | cb | rv32c rv64c | VBR |
395 |c.bnez | crs1q cimmb | cb | rv32c rv64c | VBR |
396 |c.fldsp | cfrd cimmldsp | ci·ldsp+f | rv32c rv64c | VLU |
397 |c.lwsp | crd cimmlwsp | ci·lwsp | rv32c rv64c | VLU |
398 |c.flwsp | cfrd cimmlwsp | ci·lwsp+f | rv32c | VLU |
399 |c.ldsp | crd cimmldsp | ci·ldsp | rv64c | VLU |
400 |c.lqsp | crd cimmlqsp | ci·lqsp | rv128c | VLU |
401 |c.fsdsp | cfrs2 cimmsdsp | css·sdsp+f | rv32c rv64c | VSU |
402 |c.swsp | crs2 cimmswsp | css·swsp | rv32c rv64c | VSU |
403 |c.fswsp | cfrs2 cimmswsp | css·swsp+f | rv32c | VSU |
404 |c.sdsp | crs2 cimmsdsp | css·sdsp | rv64c | VSU |
405 |c.sqsp | crs2 cimmsqsp | css·sqsp | rv128c | VSU |