aboutsummaryrefslogtreecommitdiff
path: root/opcodes-v
blob: a8bd0053d48ada64fe13b57740a3693b6fdf85a0 (plain)
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
# Vector loads & stores
vld       m vd     rs1 24..20=0 vlimm 26..25=0 14=1 6..0=0x07
vlds      m vd     rs1 rs2      vlimm 26..25=1 14=1 6..0=0x07
vldx      m vd     rs1 vs2      vlimm 26..25=2 14=1 6..0=0x07
vst       m    vs3 rs1 24..20=0 vsimm 26..25=0 14=1 6..0=0x27
vsts      m    vs3 rs1 rs2      vsimm 26..25=1 14=1 6..0=0x27
vstx      m    vs3 rs1 vs2      vsimm 26..25=2 14=1 6..0=0x27

# Vector AMOs
vamoswap  m vd vs3 vs2 19..15=0x01    26..25=3 14=1 6..0=0x27
vamoadd   m vd vs3 vs2 19..15=0x00    26..25=3 14=1 6..0=0x27
vamoxor   m vd vs3 vs2 19..15=0x04    26..25=3 14=1 6..0=0x27
vamoor    m vd vs3 vs2 19..15=0x08    26..25=3 14=1 6..0=0x27
vamoand   m vd vs3 vs2 19..15=0x0C    26..25=3 14=1 6..0=0x27
vamomin   m vd vs3 vs2 19..15=0x10    26..25=3 14=1 6..0=0x27
vamomax   m vd vs3 vs2 19..15=0x14    26..25=3 14=1 6..0=0x27

# Vector FMA
@vmadd     m vd vs1 vs2 vs3 26..25=0 14=0 6..0=0x67
@vmsub     m vd vs1 vs2 vs3 26..25=1 14=0 6..0=0x67
@vnmsub    m vd vs1 vs2 vs3 26..25=2 14=0 6..0=0x67
@vnmadd    m vd vs1 vs2 vs3 26..25=3 14=0 6..0=0x67

# Vector arithmetic.
# First, all the immediates.
vaddi     m vd vs1 vimm         31..28=0 14=1 6..0=0x67
vsli      m vd vs1 vimm         31..28=1 14=1 6..0=0x67
vclipi    m vd vs1 vimm         31..28=3 14=1 6..0=0x67
vxori     m vd vs1 vimm         31..28=4 14=1 6..0=0x67
vsri      m vd vs1 vimm         31..28=5 14=1 6..0=0x67
vori      m vd vs1 vimm         31..28=6 14=1 6..0=0x67
vandi     m vd vs1 vimm         31..28=7 14=1 6..0=0x67

# group 31..28=8
vadd      m vd vs1 vs2 27..25=0 31..28=8 14=1 6..0=0x67
vsub      m vd vs1 vs2 27..25=1 31..28=8 14=1 6..0=0x67
vmin      m vd vs1 vs2 27..25=2 31..28=8 14=1 6..0=0x67
vmax      m vd vs1 vs2 27..25=3 31..28=8 14=1 6..0=0x67
vdiv      m vd vs1 vs2 27..25=4 31..28=8 14=1 6..0=0x67
vrem      m vd vs1 vs2 27..25=5 31..28=8 14=1 6..0=0x67
vmul      m vd vs1 vs2 27..25=6 31..28=8 14=1 6..0=0x67
vmulh     m vd vs1 vs2 27..25=7 31..28=8 14=1 6..0=0x67

# group 31..28=9
vsl       m vd vs1 vs2 27..25=0 31..28=9 14=1 6..0=0x67
vsgnjx    m vd vs1 vs2 27..25=1 31..28=9 14=1 6..0=0x67
vsgnj     m vd vs1 vs2 27..25=2 31..28=9 14=1 6..0=0x67
vsgnjn    m vd vs1 vs2 27..25=3 31..28=9 14=1 6..0=0x67
vseq      m vd vs1 vs2 27..25=4 31..28=9 14=1 6..0=0x67
vsne      m vd vs1 vs2 27..25=5 31..28=9 14=1 6..0=0x67
vslt      m vd vs1 vs2 27..25=6 31..28=9 14=1 6..0=0x67
vsge      m vd vs1 vs2 27..25=7 31..28=9 14=1 6..0=0x67

# group 31..28=10 includes instructions that write xd
# (and may also read xs1 and/or xs2).
vextract  m rd vs1 rs2 27..25=0 31..28=10 14=1 6..0=0x67
vmfirst   m rd vs1     27..25=7 31..28=10 14=1 6..0=0x67 24..20=0
vmpop     m rd vs1     27..25=7 31..28=10 14=1 6..0=0x67 24..20=1

# group 31..28=11 includes instructions that read xs1 and/or xs2,
# but do not write xd.
vclip     m vd vs1 rs2 27..25=0 31..28=11 14=1 6..0=0x67
vcvt      m vd vs1 rs2 27..25=1 31..28=11 14=1 6..0=0x67
vslide    m vd vs1 rs2 27..25=2 31..28=11 14=1 6..0=0x67
vinsert   m vd rs1 rs2 27..25=4 31..28=11 14=1 6..0=0x67

# group 31..28=12
vxor      m vd vs1 vs2 27..25=0 31..28=12 14=1 6..0=0x67
vmerge    m vd vs1 vs2 27..25=1 31..28=12 14=1 6..0=0x67
vselect   m vd vs1 vs2 27..25=2 31..28=12 14=1 6..0=0x67
# group 31..28=12, 27..25=7 is for single-argument instructions.
vclass    m vd vs1     27..25=7 31..28=12 14=1 6..0=0x67 24..20=0
vpopc     m vd vs1     27..25=7 31..28=12 14=1 6..0=0x67 24..20=1
vsqrt     m vd vs1     27..25=7 31..28=12 14=1 6..0=0x67 24..20=2

# group 31..28=13
vsr       m vd vs1 vs2 27..25=0 31..28=13 14=1 6..0=0x67

# group 31..28=14
vor       m vd vs1 vs2 27..25=0 31..28=14 14=1 6..0=0x67

# group 31..28=15
vand      m vd vs1 vs2 27..25=0 31..28=15 14=1 6..0=0x67