-
Notifications
You must be signed in to change notification settings - Fork 11
/
opcode-classes
208 lines (189 loc) · 3.68 KB
/
opcode-classes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# RV32I
lui alu
auipc alu
jal jump
jalr jump,indirect
beq branch
bne branch
blt branch
bge branch
bltu branch
bgeu branch
lb load
lh load
lw load
lbu load
lhu load
lwu load
sb store
sh store
sw store
addi alu
slti alu
sltiu alu
xori alu
ori alu
andi alu
slli alu
srli alu
srai alu
add alu
sub alu
sll alu
slt alu
sltu alu
xor alu
srl alu
sra alu
or alu
and alu
fence fence
fence.i fence
# RV64I
ld load
sd store
addiw alu
slliw alu
srliw alu
sraiw alu
addw alu
subw alu
sllw alu
srlw alu
sraw alu
# RV32M
mul alu,multiply
mulh alu,multiply
mulhsu alu,multiply
mulhu alu,multiply
div alu,divide
divu alu,divide
rem alu,divide
remu alu,divide
# RV64M
mulw alu,multiply
divw alu,multiply
divuw alu,multiply
remw alu,divide
remuw alu,divide
# RV32A "RV32A Standard Extension for Atomic Instructions"
lr.w atomic
sc.w atomic
amoswap.w atomic
amoadd.w atomic
amoxor.w atomic
amoor.w atomic
amoand.w atomic
amomin.w atomic
amomax.w atomic
amominu.w atomic
amomaxu.w atomic
# RV64A "RV64A Standard Extension for Atomic Instructions (in addition to RV32A)"
lr.d atomic
sc.d atomic
amoswap.d atomic
amoadd.d atomic
amoxor.d atomic
amoor.d atomic
amoand.d atomic
amomin.d atomic
amomax.d atomic
amominu.d atomic
amomaxu.d atomic
# RV32S "RV32S Standard Extension for Supervisor-level Instructions"
ecall system
ebreak system
uret system
sret system
hret system
mret system
dret system
sfence.vm system
wfi system
rdcycle csr
rdtime csr
rdinstret csr
rdcycleh csr
rdtimeh csr
rdinstreth csr
csrrw csr
csrrs csr
csrrc csr
csrrwi csr
csrrsi csr
csrrci csr
# RV32F "RV32F Standard Extension for Single-Precision Floating-Point"
flw fpu,load
fsw fpu,store
fmadd.s fpu,fma
fmsub.s fpu,fma
fnmadd.s fpu,fma
fnmsub.s fpu,fma
fadd.s fpu
fsub.s fpu
fmul.s fpu
fdiv.s fpu,fdiv
fsgnj.s fpu
fsgnjn.s fpu
fsgnjx.s fpu
fmin.s fpu
fmax.s fpu
fsqrt.s fpu,fsqrt
fle.s fpu
flt.s fpu
feq.s fpu
fcvt.w.s fpu,fcvt
fcvt.wu.s fpu,fcvt
fcvt.s.w fpu,fcvt
fcvt.s.wu fpu,fcvt
fmv.x.s fpu,fmove
fclass.s fpu
fmv.s.x fpu,fmove
# RV64F "RV64F Standard Extension for Single-Precision Floating-Point (in addition to RV32F)"
fcvt.l.s fpu,fcvt
fcvt.lu.s fpu,fcvt
fcvt.s.l fpu,fcvt
fcvt.s.lu fpu,fcvt
# RV32D "RV32D Standard Extension for Double-Precision Floating-Point"
fld fpu,load
fsd fpu,store
fmadd.d fpu,fma
fmsub.d fpu,fma
fnmadd.d fpu,fma
fnmsub.d fpu,fma
fadd.d fpu
fsub.d fpu
fmul.d fpu
fdiv.d fpu,fdiv
fsgnj.d fpu
fsgnjn.d fpu
fsgnjx.d fpu
fmin.d fpu
fmax.d fpu
fcvt.s.d fpu,fcvt
fcvt.d.s fpu,fcvt
fsqrt.d fpu,fsqrt
fle.d fpu
flt.d fpu
feq.d fpu
fcvt.w.d fpu,fcvt
fcvt.wu.d fpu,fcvt
fcvt.d.w fpu,fcvt
fcvt.d.wu fpu,fcvt
fclass.d fpu
# RV64D "RV64D Standard Extension for Double-Precision Floating-Point (in addition to RV32D)"
fcvt.l.d fpu,fcvt
fcvt.lu.d fpu,fcvt
fmv.x.d fpu,fmove
fcvt.d.l fpu,fcvt
fcvt.d.lu fpu,fcvt
fmv.d.x fpu,fmove
# RV32FD "RV32F and RV32D Common Floating-Point Instructions"
frcsr csr
frrm csr
frflags csr
fscsr csr
fsrm csr
fsflags csr
fsrmi csr
fsflagsi csr