Project

General

Profile

RISC-V Instruction Set » History » Version 42

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