File tree Expand file tree Collapse file tree 14 files changed +150
-150
lines changed
backends/instructions_appendix Expand file tree Collapse file tree 14 files changed +150
-150
lines changed Original file line number Diff line number Diff line change @@ -5,20 +5,20 @@ kind: instruction
5
5
name : c.add
6
6
long_name : Add
7
7
description : |
8
- Add the value in rs2 to rd , and store the result in rd .
9
- C.ADD expands into `add rd, rd, rs2 `.
8
+ Add the value in xs2 to xd , and store the result in xd .
9
+ C.ADD expands into `add xd, xd, xs2 `.
10
10
definedBy :
11
11
anyOf :
12
12
- C
13
13
- Zca
14
- assembly : xd, rs2
14
+ assembly : xd, xs2
15
15
encoding :
16
16
match : 1001----------10
17
17
variables :
18
- - name : rs2
18
+ - name : xs2
19
19
location : 6-2
20
20
not : 0
21
- - name : rd
21
+ - name : xd
22
22
location : 11-7
23
23
not : 0
24
24
access :
@@ -27,9 +27,9 @@ access:
27
27
vs : always
28
28
vu : always
29
29
operation() : |
30
- XReg t0 = X[rd ];
31
- XReg t1 = X[rs2 ];
32
- X[rd ] = t0 + t1;
30
+ XReg t0 = X[xd ];
31
+ XReg t1 = X[xs2 ];
32
+ X[xd ] = t0 + t1;
33
33
34
34
# SPDX-SnippetBegin
35
35
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>
Original file line number Diff line number Diff line change @@ -5,31 +5,31 @@ kind: instruction
5
5
name : c.addw
6
6
long_name : Add word
7
7
description : |
8
- Add the 32-bit values in rs2 from rd , and store the result in rd .
9
- The rd and rs2 register indexes should be used as rd +8 and rs2 +8 (registers x8-x15).
10
- C.ADDW expands into `addw rd, rd, rs2 `.
8
+ Add the 32-bit values in xs2 from xd , and store the result in xd .
9
+ The xd and xs2 register indexes should be used as xd +8 and xs2 +8 (registers x8-x15).
10
+ C.ADDW expands into `addw xd, xd, xs2 `.
11
11
definedBy :
12
12
anyOf :
13
13
- C
14
14
- Zca
15
15
base : 64
16
- assembly : xd, rs2
16
+ assembly : xd, xs2
17
17
encoding :
18
18
match : 100111---01---01
19
19
variables :
20
- - name : rs2
20
+ - name : xs2
21
21
location : 4-2
22
- - name : rd
22
+ - name : xd
23
23
location : 9-7
24
24
access :
25
25
s : always
26
26
u : always
27
27
vs : always
28
28
vu : always
29
29
operation() : |
30
- Bits<32> t0 = X[creg2reg(rd )][31:0];
31
- Bits<32> t1 = X[creg2reg(rs2 )][31:0];
32
- X[creg2reg(rd )] = $signed(t0 + t1);
30
+ Bits<32> t0 = X[creg2reg(xd )][31:0];
31
+ Bits<32> t1 = X[creg2reg(xs2 )][31:0];
32
+ X[creg2reg(xd )] = $signed(t0 + t1);
33
33
34
34
# SPDX-SnippetBegin
35
35
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>
Original file line number Diff line number Diff line change @@ -5,30 +5,30 @@ kind: instruction
5
5
name : c.and
6
6
long_name : And
7
7
description : |
8
- And rd with rs2 , and store the result in rd
9
- The rd and rs2 register indexes should be used as rd +8 and rs2 +8 (registers x8-x15).
10
- C.AND expands into `and rd, rd, rs2 `.
8
+ And xd with xs2 , and store the result in xd
9
+ The xd and xs2 register indexes should be used as xd +8 and xs2 +8 (registers x8-x15).
10
+ C.AND expands into `and xd, xd, xs2 `.
11
11
definedBy :
12
12
anyOf :
13
13
- C
14
14
- Zca
15
- assembly : xd, rs2
15
+ assembly : xd, xs2
16
16
encoding :
17
17
match : 100011---11---01
18
18
variables :
19
- - name : rs2
19
+ - name : xs2
20
20
location : 4-2
21
- - name : rd
21
+ - name : xd
22
22
location : 9-7
23
23
access :
24
24
s : always
25
25
u : always
26
26
vs : always
27
27
vu : always
28
28
operation() : |
29
- XReg t0 = X[creg2reg(rd )];
30
- XReg t1 = X[creg2reg(rs2 )];
31
- X[creg2reg(rd )] = t0 & t1;
29
+ XReg t0 = X[creg2reg(xd )];
30
+ XReg t1 = X[creg2reg(xs2 )];
31
+ X[creg2reg(xd )] = t0 & t1;
32
32
33
33
# SPDX-SnippetBegin
34
34
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>
Original file line number Diff line number Diff line change @@ -5,30 +5,30 @@ kind: instruction
5
5
name : c.or
6
6
long_name : Or
7
7
description : |
8
- Or rd with rs2 , and store the result in rd
9
- The rd and rs2 register indexes should be used as rd +8 and rs2 +8 (registers x8-x15).
10
- C.OR expands into `or rd, rd, rs2 `.
8
+ Or xd with xs2 , and store the result in xd
9
+ The xd and xs2 register indexes should be used as xd +8 and xs2 +8 (registers x8-x15).
10
+ C.OR expands into `or xd, xd, xs2 `.
11
11
definedBy :
12
12
anyOf :
13
13
- C
14
14
- Zca
15
- assembly : xd, rs2
15
+ assembly : xd, xs2
16
16
encoding :
17
17
match : 100011---10---01
18
18
variables :
19
- - name : rs2
19
+ - name : xs2
20
20
location : 4-2
21
- - name : rd
21
+ - name : xd
22
22
location : 9-7
23
23
access :
24
24
s : always
25
25
u : always
26
26
vs : always
27
27
vu : always
28
28
operation() : |
29
- XReg t0 = X[creg2reg(rd )];
30
- XReg t1 = X[creg2reg(rs2 )];
31
- X[creg2reg(rd )] = t0 | t1;
29
+ XReg t0 = X[creg2reg(xd )];
30
+ XReg t1 = X[creg2reg(xs2 )];
31
+ X[creg2reg(xd )] = t0 | t1;
32
32
33
33
# SPDX-SnippetBegin
34
34
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>
Original file line number Diff line number Diff line change @@ -5,30 +5,30 @@ kind: instruction
5
5
name : c.sub
6
6
long_name : Subtract
7
7
description : |
8
- Subtract the value in rs2 from rd , and store the result in rd .
9
- The rd and rs2 register indexes should be used as rd +8 and rs2 +8 (registers x8-x15).
10
- C.SUB expands into `sub rd, rd, rs2 `.
8
+ Subtract the value in xs2 from xd , and store the result in xd .
9
+ The xd and xs2 register indexes should be used as xd +8 and xs2 +8 (registers x8-x15).
10
+ C.SUB expands into `sub xd, xd, xs2 `.
11
11
definedBy :
12
12
anyOf :
13
13
- C
14
14
- Zca
15
- assembly : xd, rs2
15
+ assembly : xd, xs2
16
16
encoding :
17
17
match : 100011---00---01
18
18
variables :
19
- - name : rs2
19
+ - name : xs2
20
20
location : 4-2
21
- - name : rd
21
+ - name : xd
22
22
location : 9-7
23
23
access :
24
24
s : always
25
25
u : always
26
26
vs : always
27
27
vu : always
28
28
operation() : |
29
- XReg t0 = X[creg2reg(rd )];
30
- XReg t1 = X[creg2reg(rs2 )];
31
- X[creg2reg(rd )] = t0 - t1;
29
+ XReg t0 = X[creg2reg(xd )];
30
+ XReg t1 = X[creg2reg(xs2 )];
31
+ X[creg2reg(xd )] = t0 - t1;
32
32
33
33
# SPDX-SnippetBegin
34
34
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>
Original file line number Diff line number Diff line change @@ -5,31 +5,31 @@ kind: instruction
5
5
name : c.subw
6
6
long_name : Subtract word
7
7
description : |
8
- Subtract the 32-bit values in rs2 from rd , and store the result in rd .
9
- The rd and rs2 register indexes should be used as rd +8 and rs2 +8 (registers x8-x15).
10
- C.SUBW expands into `subw rd, rd, rs2 `.
8
+ Subtract the 32-bit values in xs2 from xd , and store the result in xd .
9
+ The xd and xs2 register indexes should be used as xd +8 and xs2 +8 (registers x8-x15).
10
+ C.SUBW expands into `subw xd, xd, xs2 `.
11
11
definedBy :
12
12
anyOf :
13
13
- C
14
14
- Zca
15
15
base : 64
16
- assembly : xd, rs2
16
+ assembly : xd, xs2
17
17
encoding :
18
18
match : 100111---00---01
19
19
variables :
20
- - name : rs2
20
+ - name : xs2
21
21
location : 4-2
22
- - name : rd
22
+ - name : xd
23
23
location : 9-7
24
24
access :
25
25
s : always
26
26
u : always
27
27
vs : always
28
28
vu : always
29
29
operation() : |
30
- Bits<32> t0 = X[creg2reg(rd )][31:0];
31
- Bits<32> t1 = X[creg2reg(rs2 )][31:0];
32
- X[creg2reg(rd )] = sext(t0 - t1, 31);
30
+ Bits<32> t0 = X[creg2reg(xd )][31:0];
31
+ Bits<32> t1 = X[creg2reg(xs2 )][31:0];
32
+ X[creg2reg(xd )] = sext(t0 - t1, 31);
33
33
34
34
# SPDX-SnippetBegin
35
35
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>
Original file line number Diff line number Diff line change @@ -5,30 +5,30 @@ kind: instruction
5
5
name : c.xor
6
6
long_name : Exclusive Or
7
7
description : |
8
- Exclusive or rd with rs2 , and store the result in rd
9
- The rd and rs2 register indexes should be used as rd +8 and rs2 +8 (registers x8-x15).
10
- C.XOR expands into `xor rd, rd, rs2 `.
8
+ Exclusive or xd with xs2 , and store the result in xd
9
+ The xd and xs2 register indexes should be used as xd +8 and xs2 +8 (registers x8-x15).
10
+ C.XOR expands into `xor xd, xd, xs2 `.
11
11
definedBy :
12
12
anyOf :
13
13
- C
14
14
- Zca
15
- assembly : xd, rs2
15
+ assembly : xd, xs2
16
16
encoding :
17
17
match : 100011---01---01
18
18
variables :
19
- - name : rs2
19
+ - name : xs2
20
20
location : 4-2
21
- - name : rd
21
+ - name : xd
22
22
location : 9-7
23
23
access :
24
24
s : always
25
25
u : always
26
26
vs : always
27
27
vu : always
28
28
operation() : |
29
- XReg t0 = X[creg2reg(rd )];
30
- XReg t1 = X[creg2reg(rs2 )];
31
- X[creg2reg(rd )] = t0 ^ t1;
29
+ XReg t0 = X[creg2reg(xd )];
30
+ XReg t1 = X[creg2reg(xs2 )];
31
+ X[creg2reg(xd )] = t0 ^ t1;
32
32
33
33
# SPDX-SnippetBegin
34
34
# SPDX-FileCopyrightText: 2017-2025 Contributors to the RISCV Sail Model <https://github.com/riscv/sail-riscv/blob/master/LICENCE>
Original file line number Diff line number Diff line change 3
3
$schema : " inst_schema.json#"
4
4
kind : instruction
5
5
name : froundnx.s
6
- long_name : No synopsis available
6
+ long_name : Floating-point Round Single-precision to Integer with Inexact
7
7
description : |
8
8
No description available.
9
9
definedBy : Zfa
10
- assembly : fd, rs1 , rm
10
+ assembly : fd, xs1 , rm
11
11
encoding :
12
12
match : 010000000101-------------1010011
13
13
variables :
14
- - name : rs1
14
+ - name : xs1
15
15
location : 19-15
16
16
- name : rm
17
17
location : 14-12
Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ description: |
13
13
14
14
definedBy :
15
15
anyOf : [Zfh, Zfhmin, Zhinx]
16
- assembly : xd, imm12($rs1 )
16
+ assembly : xd, imm12(xs1 )
17
17
encoding :
18
18
match : -----------------001-----0000111
19
19
variables :
20
20
- name : imm
21
21
location : 31-20
22
- - name : rs1
22
+ - name : xs1
23
23
location : 19-15
24
24
- name : fd
25
25
location : 11-7
@@ -31,7 +31,7 @@ access:
31
31
operation() : |
32
32
check_f_ok($encoding);
33
33
34
- XReg virtual_address = X[rs1 ] + $signed(imm);
34
+ XReg virtual_address = X[xs1 ] + $signed(imm);
35
35
36
36
Bits<16> hp_value = read_memory<16>(virtual_address, $encoding);
37
37
Original file line number Diff line number Diff line change 3
3
$schema : inst_schema.json#
4
4
kind : instruction
5
5
name : fli.h
6
- long_name : No synopsis available
6
+ long_name : Floating-point Load Immediate Half-precision
7
7
description : |
8
8
No description available.
9
9
definedBy :
10
10
allOf : [Zfa, Zfh]
11
- assembly : rd , imm
11
+ assembly : fd , imm
12
12
encoding :
13
13
match : 111101000001-----000-----1010011
14
14
variables :
15
- - name : rs1
15
+ - name : imm
16
16
location : 19-15
17
- - name : rd
17
+ - name : fd
18
18
location : 11-7
19
19
access :
20
20
s : always
You can’t perform that action at this time.
0 commit comments