Skip to content

Commit b1761ee

Browse files
authored
fix(data): correct floating point register names in places (#850)
Old register names are being used in some places for description, assembly, fields. Related to riscv/sail-riscv#1049 Fixes #843
1 parent 9cb6fd5 commit b1761ee

File tree

9 files changed

+87
-87
lines changed

9 files changed

+87
-87
lines changed

arch/inst/Zcd/c.fld.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ kind: instruction
55
name: c.fld
66
long_name: Load double-precision
77
description: |
8-
Loads a double precision floating-point value from memory into register rd.
8+
Loads a double precision floating-point value from memory into register fd.
99
It computes an effective address by adding the zero-extended offset, scaled by 8,
10-
to the base address in register rs1.
11-
It expands to `fld` `rd, offset(rs1)`.
10+
to the base address in register xs1.
11+
It expands to `fld` `fd, offset(xs1)`.
1212
definedBy:
1313
anyOf:
1414
- allOf:
@@ -22,9 +22,9 @@ encoding:
2222
- name: imm
2323
location: 6-5|12-10
2424
left_shift: 3
25-
- name: rd
25+
- name: fd
2626
location: 4-2
27-
- name: rs1
27+
- name: xs1
2828
location: 9-7
2929
access:
3030
s: always
@@ -36,6 +36,6 @@ operation(): |
3636
raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
3737
}
3838
39-
XReg virtual_address = X[creg2reg(rs1)] + imm;
39+
XReg virtual_address = X[creg2reg(xs1)] + imm;
4040
41-
X[creg2reg(rd)] = sext(read_memory<64>(virtual_address, $encoding), 64);
41+
f[fd] = sext(read_memory<64>(virtual_address, $encoding), 64);

arch/inst/Zcd/c.fldsp.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ kind: instruction
55
name: c.fldsp
66
long_name: Load doubleword into floating-point register from stack
77
description: |
8-
Loads a double-precision floating-point value from memory into floating-point register rd.
8+
Loads a double-precision floating-point value from memory into floating-point register fd.
99
It computes its effective address by adding the zero-extended offset, scaled by 8,
1010
to the stack pointer, x2.
11-
It expands to `fld` `rd, offset(x2)`.
11+
It expands to `fld` `fd, offset(x2)`.
1212
definedBy:
1313
anyOf:
1414
- allOf:
@@ -22,7 +22,7 @@ encoding:
2222
- name: imm
2323
location: 4-2|12|6-5
2424
left_shift: 3
25-
- name: rd
25+
- name: fd
2626
location: 11-7
2727
access:
2828
s: always
@@ -39,4 +39,4 @@ operation(): |
3939
4040
XReg virtual_address = X[2] + imm;
4141
42-
f[rd] = read_memory<64>(virtual_address, $encoding);
42+
f[fd] = read_memory<64>(virtual_address, $encoding);

arch/inst/Zcd/c.fsd.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ kind: instruction
55
name: c.fsd
66
long_name: Store double-precision
77
description: |
8-
Stores a double precision floating-point value in register rs2 to memory.
8+
Stores a double precision floating-point value in register fs2 to memory.
99
It computes an effective address by adding the zero-extended offset, scaled by 8,
10-
to the base address in register rs1.
11-
It expands to `fsd` `rs2, offset(rs1)`.
10+
to the base address in register xs1.
11+
It expands to `fsd` `fs2, offset(xs1)`.
1212
definedBy:
1313
anyOf:
1414
- allOf:
@@ -22,9 +22,9 @@ encoding:
2222
- name: imm
2323
location: 6-5|12-10
2424
left_shift: 3
25-
- name: rs2
25+
- name: fs2
2626
location: 4-2
27-
- name: rs1
27+
- name: xs1
2828
location: 9-7
2929
access:
3030
s: always
@@ -36,6 +36,6 @@ operation(): |
3636
raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
3737
}
3838
39-
XReg virtual_address = X[creg2reg(rs1)] + imm;
39+
XReg virtual_address = X[creg2reg(xs1)] + imm;
4040
41-
write_memory<64>(virtual_address, X[creg2reg(rs2)], $encoding);
41+
write_memory<64>(virtual_address, X[creg2reg(fs2)], $encoding);

arch/inst/Zcd/c.fsdsp.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ kind: instruction
55
name: c.fsdsp
66
long_name: Store double-precision value to stack
77
description: |
8-
Stores a double-precision floating-point value in floating-point register rs2 to memory.
8+
Stores a double-precision floating-point value in floating-point register fs2 to memory.
99
It computes an effective address by adding the zero-extended offset, scaled by 8,
1010
to the stack pointer, x2.
11-
It expands to `fsd` `rs2, offset(x2)`.
11+
It expands to `fsd` `fs2, offset(x2)`.
1212
definedBy:
1313
anyOf:
1414
- allOf:
@@ -22,7 +22,7 @@ encoding:
2222
- name: imm
2323
location: 9-7|12-10
2424
left_shift: 3
25-
- name: rs2
25+
- name: fs2
2626
location: 6-2
2727
access:
2828
s: always
@@ -39,4 +39,4 @@ operation(): |
3939
4040
XReg virtual_address = X[2] + imm;
4141
42-
write_memory<64>(virtual_address, f[rs2][63:0], $encoding);
42+
write_memory<64>(virtual_address, f[fs2][63:0], $encoding);

arch/inst/Zcf/c.flw.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@ kind: instruction
55
name: c.flw
66
long_name: Load single-precision
77
description: |
8-
Loads a single precision floating-point value from memory into register rd.
8+
Loads a single precision floating-point value from memory into register fd.
99
It computes an effective address by adding the zero-extended offset, scaled by 4,
10-
to the base address in register rs1.
11-
It expands to `flw` `rd, offset(rs1)`.
10+
to the base address in register xs1.
11+
It expands to `flw` `fd, offset(xs1)`.
1212
definedBy:
1313
anyOf:
1414
- allOf:
1515
- C
1616
- F
1717
- Zcf
18-
assembly: xd, imm(xs1)
18+
assembly: fd, imm(xs1)
1919
base: 32
2020
encoding:
2121
match: 011-----------00
2222
variables:
2323
- name: imm
2424
location: 5|12-10|6
2525
left_shift: 2
26-
- name: rd
26+
- name: fd
2727
location: 4-2
28-
- name: rs1
28+
- name: xs1
2929
location: 9-7
3030
access:
3131
s: always
@@ -37,6 +37,6 @@ operation(): |
3737
raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
3838
}
3939
40-
XReg virtual_address = X[creg2reg(rs1)] + imm;
40+
XReg virtual_address = X[creg2reg(xs1)] + imm;
4141
42-
X[creg2reg(rd)] = sext(read_memory<32>(virtual_address, $encoding), 32);
42+
X[creg2reg(fd)] = sext(read_memory<32>(virtual_address, $encoding), 32);

arch/inst/Zcf/c.flwsp.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ kind: instruction
55
name: c.flwsp
66
long_name: Load word into floating-point register from stack
77
description: |
8-
Loads a single-precision floating-point value from memory into floating-point register rd.
8+
Loads a single-precision floating-point value from memory into floating-point register fd.
99
It computes its effective address by adding the zero-extended offset, scaled by 4,
1010
to the stack pointer, x2.
11-
It expands to `flw` `rd, offset(x2)`.
11+
It expands to `flw` `fd, offset(x2)`.
1212
definedBy:
1313
anyOf:
1414
- allOf:
@@ -23,7 +23,7 @@ encoding:
2323
- name: imm
2424
location: 3-2|12|6-4
2525
left_shift: 2
26-
- name: rd
26+
- name: fd
2727
location: 11-7
2828
access:
2929
s: always
@@ -40,4 +40,4 @@ operation(): |
4040
4141
XReg virtual_address = X[2] + imm;
4242
43-
f[rd] = read_memory<32>(virtual_address, $encoding);
43+
f[fd] = read_memory<32>(virtual_address, $encoding);

arch/inst/Zcf/c.fsw.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@ kind: instruction
55
name: c.fsw
66
long_name: Store single-precision
77
description: |
8-
Stores a single precision floating-point value in register rs2 to memory.
8+
Stores a single precision floating-point value in register fs2 to memory.
99
It computes an effective address by adding the zero-extended offset, scaled by 4,
10-
to the base address in register rs1.
11-
It expands to `fsw` `rs2, offset(rs1)`.
10+
to the base address in register xs1.
11+
It expands to `fsw` `fs2, offset(xs1)`.
1212
definedBy:
1313
anyOf:
1414
- allOf:
1515
- C
1616
- F
1717
- Zcf
1818
base: 32
19-
assembly: xs2, imm(xs1)
19+
assembly: fs2, imm(xs1)
2020
encoding:
2121
match: 111-----------00
2222
variables:
2323
- name: imm
2424
location: 5|12-10|6
2525
left_shift: 2
26-
- name: rs2
26+
- name: fs2
2727
location: 4-2
28-
- name: rs1
28+
- name: xs1
2929
location: 9-7
3030
access:
3131
s: always
@@ -37,6 +37,6 @@ operation(): |
3737
raise(ExceptionCode::IllegalInstruction, mode(), $encoding);
3838
}
3939
40-
XReg virtual_address = X[creg2reg(rs1)] + imm;
40+
XReg virtual_address = X[creg2reg(xs1)] + imm;
4141
42-
write_memory<32>(virtual_address, X[creg2reg(rs2)][31:0], $encoding);
42+
write_memory<32>(virtual_address, X[creg2reg(fs2)][31:0], $encoding);

arch/inst/Zcf/c.fswsp.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ kind: instruction
55
name: c.fswsp
66
long_name: Store single-precision value to stack
77
description: |
8-
Stores a single-precision floating-point value in floating-point register rs2 to memory.
8+
Stores a single-precision floating-point value in floating-point register fs2 to memory.
99
It computes an effective address by adding the zero-extended offset, scaled by 4,
1010
to the stack pointer, x2.
11-
It expands to `fsw` `rs2, offset(x2)`.
11+
It expands to `fsw` `fs2, offset(x2)`.
1212
definedBy:
1313
anyOf:
1414
- allOf:
@@ -23,7 +23,7 @@ encoding:
2323
- name: imm
2424
location: 8-7|12-9
2525
left_shift: 2
26-
- name: rs2
26+
- name: fs2
2727
location: 6-2
2828
access:
2929
s: always
@@ -40,4 +40,4 @@ operation(): |
4040
4141
XReg virtual_address = X[2] + imm;
4242
43-
write_memory<32>(virtual_address, f[rs2][31:0], $encoding);
43+
write_memory<32>(virtual_address, f[fs2][31:0], $encoding);

0 commit comments

Comments
 (0)