Project

General

Profile

RISC-V Instruction Set » History » Version 41

Andrei Tatarnikov, 07/26/2018 05:41 PM

1 7 Andrei Tatarnikov
h1. Instructions supported by MicroTESK for RISC-V
2
3 41 Andrei Tatarnikov
The table below shows the status of support for particular instructions in MicroTESK for RISC-V.
4 38 Andrei Tatarnikov
5
There are three stages of support marked with different colors:
6
{background:#cfc}. | Fully supported |
7
{background:#ff9}. | Partially supported |
8
{background:#fcc}. | Currently unsupported |
9
10 39 Andrei Tatarnikov
To be supported in MicroTESK, instructions need to be described in formal specifications. The <code>Specified</code> column shows whether specific instructions were described in the specifications.
11
12 40 Andrei Tatarnikov
The instruction semantics described in specifications may be incomplete or invalid. Therefore, instruction specifications must be validated with tests (e.g. ones ported from https://github.com/riscv/riscv-tests). To perform validation, the tests are executed in an ISA simulator constructed on the basis of the specifications. The <code>Validated</code> column shows whether the specifications of specific instructions were validated with tests.
13
14
NOTE: Incomplete or invalid semantics of instruction in specifications does not that these instructions cannot be used in test programs. It just prevent using them in tests that require information on the current state of registers and memory (e.g. self-checking tests and constraint-based tests). In general, to generate random tests, only the syntax of instructions is required to be valid whereas the semantics may be incomplete. 
15 39 Andrei Tatarnikov
16 11 Andrei Tatarnikov
{font-weight:bold; background:#ddd}. | Instruction Set | Instructions | Specified | Validated |
17 30 Andrei Tatarnikov
{background:#cfc}. | *RV32I (User)* | LUI
18 19 Andrei Tatarnikov
                               AUIPC
19
                               JAL
20
                               JALR
21
                               BEQ
22
                               BNE
23
                               BLT
24
                               BGE
25
                               BLTU
26
                               BGEU
27
                               LB
28
                               LH
29
                               LW
30
                               LBU
31
                               LHU
32
                               SB
33
                               SH
34
                               SW
35
                               ADDI
36
                               SLTI
37
                               SLTIU
38
                               XORI
39
                               ORI
40
                               ANDI
41
                               SLLI
42
                               SRLI
43
                               SRAI
44
                               SLL
45
                               SRL
46
                               SRA
47
                               ADD
48
                               SUB
49
                               SLT
50
                               SLTU
51
                               XOR
52
                               OR
53 23 Andrei Tatarnikov
                               AND | Yes (37/37) | Yes (37/37) |
54 30 Andrei Tatarnikov
{background:#cfc}. | *RV64I (User)* | LWU
55 22 Andrei Tatarnikov
                               LD
56
                               SD
57
                               ADDIW
58
                               SLLIW
59
                               SRLIW
60
                               SRAIW
61
                               ADDW
62
                               SUBW
63
                               SLLW
64 1 Alexander Protsenko
                               SRLW
65
                               SRAW | Yes (12/12) | Yes (12/12) |
66 30 Andrei Tatarnikov
{background:#ff9}. | *RV32I (System)* | ECALL
67
                                        EBREAK
68
                                        FENCE
69
                                        FENCE.I
70
                                        MRET
71
                                        SRET
72
                                        URET
73
                                        WFI
74
                                        CSRRW
75
                                        CSRRS
76
                                        CSRRC
77
                                        CSRRWI
78
                                        CSRRSI
79 31 Andrei Tatarnikov
                                        CSRRCI | Yes (14/14) | No (0/14) |
80 15 Andrei Tatarnikov
{background:#cfc}. | *RV32M* | MUL
81 18 Andrei Tatarnikov
                               MULH
82
                               MULHSU
83
                               MULHU
84
                               DIV
85
                               DIVU
86
                               REM
87
                               REMU | Yes (8/8) | Yes (8/8) |
88 15 Andrei Tatarnikov
{background:#cfc}. | *RV64M* | MULW
89 18 Andrei Tatarnikov
                               DIVW
90
                               DIVUW
91
                               REMW
92
                               REMUW | Yes (5/5) | Yes (5/5) |
93 15 Andrei Tatarnikov
{background:#cfc}. | *RV32A* | LR.W
94 18 Andrei Tatarnikov
                               SC.W
95
                               AMOSWAP.W
96
                               AMOADD.W
97
                               AMOXOR.W
98
                               AMOAND.W
99
                               AMOOR.W
100
                               AMOMIN.W
101
                               AMOMAX.W
102
                               AMOMINU.W
103
                               AMOMAXU.W | Yes (11/11) | Yes (11/11) |
104 15 Andrei Tatarnikov
{background:#cfc}. | *RV64A* | LR.D
105 18 Andrei Tatarnikov
                               SC.D
106
                               AMOSWAP.D
107
                               AMOADD.D
108
                               AMOXOR.D
109
                               AMOAND.D
110
                               AMOOR.D
111
                               AMOMIN.D
112
                               AMOMAX.D
113
                               AMOMINU.D
114
                               AMOMAXU.D | Yes (11/11) | Yes (11/11) |
115 15 Andrei Tatarnikov
{background:#ff9}. | *RV32F* | FLW
116 17 Andrei Tatarnikov
                               FSW
117
                               FMADD.S
118
                               FMSUB.S
119
                               FNMSUB.S
120
                               FNMADD.S
121
                               FADD.S
122
                               FSUB.S
123
                               FMUL.S
124
                               FDIV.S
125
                               FSQRT.S
126
                               FSGNJ.S
127
                               FSGNJN.S
128
                               FSGNJX.S
129
                               FMIN.S
130
                               FMAX.S
131
                               FCVT.W.S
132
                               FCVT.WU.S
133
                               FMV.X.W (FMV.X.S)
134
                               FEQ.S
135
                               FLT.S
136
                               FLE.S
137
                               FCLASS.S
138
                               FCVT.S.W
139
                               FCVT.S.WU
140 35 Andrei Tatarnikov
                               FMV.W.X (FMV.S.X) | Yes (26/26) | Partially (8/26)
141 36 Andrei Tatarnikov
                                                                 Including (8): 
142 35 Andrei Tatarnikov
                                                                 FLW
143
                                                                 FSW
144
                                                                 FEQ_S
145
                                                                 FLE_S
146
                                                                 FLT_S
147
                                                                 FEQ_S
148
                                                                 FLE_S
149
                                                                 FLT_S |
150 17 Andrei Tatarnikov
{background:#ff9}. | *RV64F* | FCVT.L.S
151
                               FCVT.LU.S
152
                               FCVT.S.L
153 36 Andrei Tatarnikov
                               FCVT.S.LU | Yes (4/4) | Partially (0/4) |
154 17 Andrei Tatarnikov
{background:#ff9}. | *RV32D* | FLD
155
                               FSD
156
                               FMADD.D
157
                               FMSUB.D
158
                               FNMSUB.D
159
                               FNMADD.D
160
                               FADD.D
161
                               FSUB.D
162
                               FMUL.D
163
                               FDIV.D
164
                               FSQRT.D
165
                               FSGNJ.D
166
                               FSGNJN.D
167
                               FSGNJX.D
168
                               FMIN.D
169
                               FMAX.D
170
                               FCVT.S.D
171
                               FCVT.D.S
172
                               FEQ.D
173
                               FLT.D
174
                               FLE.D
175
                               FCLASS.D
176
                               FCVT.W.D
177 1 Alexander Protsenko
                               FCVT.WU.D
178
                               FCVT.D.W
179 36 Andrei Tatarnikov
                               FCVT.D.WU | Yes (26/26) | Partially (2/26) 
180
                                                         Including (2):
181
                                                         FLD
182
                                                         FSD |
183 18 Andrei Tatarnikov
{background:#ff9}. | *RV64D* | FCVT.L.D
184 1 Alexander Protsenko
                               FCVT.LU.D
185 18 Andrei Tatarnikov
                               FMV.X.D
186
                               FCVT.D.L
187
                               FCVT.D.LU
188 36 Andrei Tatarnikov
                               FMV.D.X   | Yes (6/6) | No (0/6)  |
189 28 Andrei Tatarnikov
{background:#ff9}. | *RVC*   | C.ADDI4SPN
190
                               C.FLD
191
                               C.LQ
192
                               C.LW
193
                               C.FLW
194
                               C.LD
195
                               C.FSD
196
                               C.SQ
197
                               C.SW
198
                               C.FSW
199
                               C.SD
200
                               C.NOP
201
                               C.ADDI
202
                               C.JAL
203
                               C.ADDIW
204
                               C.LI
205
                               C.ADDI16SP
206
                               C.LUI
207
                               C.SRLI
208
                               C.SRLI64
209
                               C.SRAI
210
                               C.SRAI64
211
                               C.ANDI
212
                               C.SUB
213
                               C.XOR
214
                               C.OR
215
                               C.AND
216
                               C.SUBW
217
                               C.ADDW
218
                               C.J
219
                               C.BEQZ
220
                               C.BNEZ
221
                               C.SLLI
222
                               C.SLLI64
223
                               C.FLDSP
224
                               C.LQSP
225
                               C.LWSP
226
                               C.FLWSP
227
                               C.LDSP
228
                               C.JR
229
                               C.MV
230
                               C.EBREAK
231
                               C.JALR
232
                               C.ADD
233
                               C.FSDSP
234
                               C.SQSP
235
                               C.SWSP
236
                               C.FSWSP
237
                               C.SDSP | Yes (49/49) | Partially (36/49)
238 32 Andrei Tatarnikov
                                                      Excluding (13): 
239
                                                      C.LQ
240
                                                      C.FLW
241
                                                      C.SQ
242
                                                      C.FSW
243
                                                      C.NOP
244
                                                      C.SRLI64
245
                                                      C.SRAI64
246
                                                      C.SLLI64
247
                                                      C.LQSP
248
                                                      C.FLWSP
249
                                                      C.EBREAK
250
                                                      C.SQSP
251
                                                      C.FSWSP |
252 34 Andrei Tatarnikov
{background:#fcc}. | *RV64Q* | | No | No |
253 33 Andrei Tatarnikov
{background:#fcc}. | *RV32V* | VADD
254
                               VSUB
255
                               VSL
256
                               VSR
257
                               VAND
258
                               VOR
259
                               VXOR
260
                               VSEQ
261
                               VSNE
262
                               VSLT
263
                               VSGE
264
                               VCLIP
265
                               VCVT
266
                               VMPOP
267
                               VMFIRST
268
                               VEXTRACT
269
                               VINSERT
270
                               VMERGE
271
                               VSELECT
272
                               VSLIDE
273
                               VDIV
274
                               VREM
275
                               VMUL
276
                               VMULH
277
                               VMIN
278
                               VMAX
279
                               VSGNJ
280
                               VSGNJN
281
                               VSGNJX
282
                               VSQRT
283
                               VCLASS
284
                               VPOPC
285
                               VADDI
286
                               VSLI
287
                               VSRI
288
                               VANDI
289
                               VORI
290
                               VXORI
291
                               VCLIPI
292 10 Andrei Tatarnikov
                               VMADD
293 7 Andrei Tatarnikov
                               VMSUB
294 37 Andrei Tatarnikov
                               VNMADD
295
                               VNMSUB | No | No |
296
{background:#ddd}. | Total |  |   | |