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
55name : c.add
66long_name : Add
77description : |
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 `.
1010definedBy :
1111 anyOf :
1212 - C
1313 - Zca
14- assembly : xd, rs2
14+ assembly : xd, xs2
1515encoding :
1616 match : 1001----------10
1717 variables :
18- - name : rs2
18+ - name : xs2
1919 location : 6-2
2020 not : 0
21- - name : rd
21+ - name : xd
2222 location : 11-7
2323 not : 0
2424access :
@@ -27,9 +27,9 @@ access:
2727 vs : always
2828 vu : always
2929operation() : |
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;
3333
3434# SPDX-SnippetBegin
3535# 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
55name : c.addw
66long_name : Add word
77description : |
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 `.
1111definedBy :
1212 anyOf :
1313 - C
1414 - Zca
1515base : 64
16- assembly : xd, rs2
16+ assembly : xd, xs2
1717encoding :
1818 match : 100111---01---01
1919 variables :
20- - name : rs2
20+ - name : xs2
2121 location : 4-2
22- - name : rd
22+ - name : xd
2323 location : 9-7
2424access :
2525 s : always
2626 u : always
2727 vs : always
2828 vu : always
2929operation() : |
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);
3333
3434# SPDX-SnippetBegin
3535# 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
55name : c.and
66long_name : And
77description : |
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 `.
1111definedBy :
1212 anyOf :
1313 - C
1414 - Zca
15- assembly : xd, rs2
15+ assembly : xd, xs2
1616encoding :
1717 match : 100011---11---01
1818 variables :
19- - name : rs2
19+ - name : xs2
2020 location : 4-2
21- - name : rd
21+ - name : xd
2222 location : 9-7
2323access :
2424 s : always
2525 u : always
2626 vs : always
2727 vu : always
2828operation() : |
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;
3232
3333# SPDX-SnippetBegin
3434# 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
55name : c.or
66long_name : Or
77description : |
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 `.
1111definedBy :
1212 anyOf :
1313 - C
1414 - Zca
15- assembly : xd, rs2
15+ assembly : xd, xs2
1616encoding :
1717 match : 100011---10---01
1818 variables :
19- - name : rs2
19+ - name : xs2
2020 location : 4-2
21- - name : rd
21+ - name : xd
2222 location : 9-7
2323access :
2424 s : always
2525 u : always
2626 vs : always
2727 vu : always
2828operation() : |
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;
3232
3333# SPDX-SnippetBegin
3434# 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
55name : c.sub
66long_name : Subtract
77description : |
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 `.
1111definedBy :
1212 anyOf :
1313 - C
1414 - Zca
15- assembly : xd, rs2
15+ assembly : xd, xs2
1616encoding :
1717 match : 100011---00---01
1818 variables :
19- - name : rs2
19+ - name : xs2
2020 location : 4-2
21- - name : rd
21+ - name : xd
2222 location : 9-7
2323access :
2424 s : always
2525 u : always
2626 vs : always
2727 vu : always
2828operation() : |
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;
3232
3333# SPDX-SnippetBegin
3434# 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
55name : c.subw
66long_name : Subtract word
77description : |
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 `.
1111definedBy :
1212 anyOf :
1313 - C
1414 - Zca
1515base : 64
16- assembly : xd, rs2
16+ assembly : xd, xs2
1717encoding :
1818 match : 100111---00---01
1919 variables :
20- - name : rs2
20+ - name : xs2
2121 location : 4-2
22- - name : rd
22+ - name : xd
2323 location : 9-7
2424access :
2525 s : always
2626 u : always
2727 vs : always
2828 vu : always
2929operation() : |
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);
3333
3434# SPDX-SnippetBegin
3535# 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
55name : c.xor
66long_name : Exclusive Or
77description : |
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 `.
1111definedBy :
1212 anyOf :
1313 - C
1414 - Zca
15- assembly : xd, rs2
15+ assembly : xd, xs2
1616encoding :
1717 match : 100011---01---01
1818 variables :
19- - name : rs2
19+ - name : xs2
2020 location : 4-2
21- - name : rd
21+ - name : xd
2222 location : 9-7
2323access :
2424 s : always
2525 u : always
2626 vs : always
2727 vu : always
2828operation() : |
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;
3232
3333# SPDX-SnippetBegin
3434# 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 33$schema : " inst_schema.json#"
44kind : instruction
55name : froundnx.s
6- long_name : No synopsis available
6+ long_name : Floating-point Round Single-precision to Integer with Inexact
77description : |
88 No description available.
99definedBy : Zfa
10- assembly : fd, rs1 , rm
10+ assembly : fd, xs1 , rm
1111encoding :
1212 match : 010000000101-------------1010011
1313 variables :
14- - name : rs1
14+ - name : xs1
1515 location : 19-15
1616 - name : rm
1717 location : 14-12
Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ description: |
1313
1414definedBy :
1515 anyOf : [Zfh, Zfhmin, Zhinx]
16- assembly : xd, imm12($rs1 )
16+ assembly : xd, imm12(xs1 )
1717encoding :
1818 match : -----------------001-----0000111
1919 variables :
2020 - name : imm
2121 location : 31-20
22- - name : rs1
22+ - name : xs1
2323 location : 19-15
2424 - name : fd
2525 location : 11-7
@@ -31,7 +31,7 @@ access:
3131operation() : |
3232 check_f_ok($encoding);
3333
34- XReg virtual_address = X[rs1 ] + $signed(imm);
34+ XReg virtual_address = X[xs1 ] + $signed(imm);
3535
3636 Bits<16> hp_value = read_memory<16>(virtual_address, $encoding);
3737
Original file line number Diff line number Diff line change 33$schema : inst_schema.json#
44kind : instruction
55name : fli.h
6- long_name : No synopsis available
6+ long_name : Floating-point Load Immediate Half-precision
77description : |
88 No description available.
99definedBy :
1010 allOf : [Zfa, Zfh]
11- assembly : rd , imm
11+ assembly : fd , imm
1212encoding :
1313 match : 111101000001-----000-----1010011
1414 variables :
15- - name : rs1
15+ - name : imm
1616 location : 19-15
17- - name : rd
17+ - name : fd
1818 location : 11-7
1919access :
2020 s : always
You can’t perform that action at this time.
0 commit comments