target/sparc: Fix register selection for all F*TOx and FxTO* instructions
v2 cover target/sparc: Fix register selection for all F*TOx and FxTO* instructions
This patchset resolves issues with incorrect register selection for the F*TOx(destination registers) and FxTO*(source registers) instructions in the Sparc architecture.
An updated testing program can be found in issue #2802[1].
[1]: https://gitlab.com/qemu-project/qemu/-/issues/2802
Changelog:
v2:
- Corrected a mistake I made in the FqTOx instruction
- Fixed issues in the FsTOx, FxTOs, FxTOd, FxTOq instructions as well
Mikael Szreder (2):
target/sparc: Fix register selection for the fdtox and fqtox
instructions
target/sparc: Fix register selection for all F*TOx and FxTO*
instructions
target/sparc/insns.decode | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.48.1
PATCH v2 1/2 target/sparc: Fix register selection for the fdtox and fqtox instructions
A bug was introduced in commit 0bba7572d40d which causes the fdtox and
fqtox instructions to incorrectly select the destination registers.
More information and a test program can be found in issue #2802.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2802
--- target/sparc/insns.decode | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
target/sparc/insns.decode +2 -2
@@ -322,8 +322,8 @@ FNHADDs 10 ..... 110100 ..... 0 0111 0001 ..... @r_r_r FNHADDd 10 ..... 110100 ..... 0 0111 0010 ..... @d_d_d FNsMULd 10 ..... 110100 ..... 0 0111 1001 ..... @d_r_r FsTOx 10 ..... 110100 00000 0 1000 0001 ..... @r_r2 -FdTOx 10 ..... 110100 00000 0 1000 0010 ..... @r_d2 -FqTOx 10 ..... 110100 00000 0 1000 0011 ..... @r_q2 +FdTOx 10 ..... 110100 00000 0 1000 0010 ..... @d_d2 +FqTOx 10 ..... 110100 00000 0 1000 0011 ..... @q_q2 FxTOs 10 ..... 110100 00000 0 1000 0100 ..... @r_r2 FxTOd 10 ..... 110100 00000 0 1000 1000 ..... @d_r2 FxTOq 10 ..... 110100 00000 0 1000 1100 ..... @q_r2
Signature · 1 line
2.48.1
PATCH v2 2/2 target/sparc: Fix register selection for all F*TOx and FxTO* instructions
In reply to Mikael SzrederFixed a mistake I made in the FqTOx instruction. Fixed issues in the FsTOx, FxTOs, FxTOd, FxTOq instructions.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2802
--- target/sparc/insns.decode | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
target/sparc/insns.decode +5 -5
@@ -321,12 +321,12 @@ FdMULq 10 ..... 110100 ..... 0 0110 1110 ..... @q_d_d FNHADDs 10 ..... 110100 ..... 0 0111 0001 ..... @r_r_r FNHADDd 10 ..... 110100 ..... 0 0111 0010 ..... @d_d_d FNsMULd 10 ..... 110100 ..... 0 0111 1001 ..... @d_r_r -FsTOx 10 ..... 110100 00000 0 1000 0001 ..... @r_r2 +FsTOx 10 ..... 110100 00000 0 1000 0001 ..... @d_r2 FdTOx 10 ..... 110100 00000 0 1000 0010 ..... @d_d2 -FqTOx 10 ..... 110100 00000 0 1000 0011 ..... @q_q2 -FxTOs 10 ..... 110100 00000 0 1000 0100 ..... @r_r2 -FxTOd 10 ..... 110100 00000 0 1000 1000 ..... @d_r2 -FxTOq 10 ..... 110100 00000 0 1000 1100 ..... @q_r2 +FqTOx 10 ..... 110100 00000 0 1000 0011 ..... @d_q2 +FxTOs 10 ..... 110100 00000 0 1000 0100 ..... @r_d2 +FxTOd 10 ..... 110100 00000 0 1000 1000 ..... @d_d2 +FxTOq 10 ..... 110100 00000 0 1000 1100 ..... @q_d2 FiTOs 10 ..... 110100 00000 0 1100 0100 ..... @r_r2 FdTOs 10 ..... 110100 00000 0 1100 0110 ..... @r_d2 FqTOs 10 ..... 110100 00000 0 1100 0111 ..... @r_q2
Signature · 1 line
2.48.1
Quoted 7 lines · Mikael Szreder
Fixed a mistake I made in the FqTOx instruction. Fixed issues in the FsTOx, FxTOs, FxTOd, FxTOq instructions.
Fixes 0bba7572d40d ("target/sparc: Perform DFPREG/QFPREG in decodetree")Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2802
Signed-off-by Mikael Szreder <[email protected]>
Quoted 29 lines
--- target/sparc/insns.decode | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)target/sparc/insns.decode +5
-6@@ -321,12 +321,12 @@ FdMULq 10 ..... 110100 ..... 0 0110 1110 ..... @q_d_d FNHADDs 10 ..... 110100 ..... 0 0111 0001 ..... @r_r_r FNHADDd 10 ..... 110100 ..... 0 0111 0010 ..... @d_d_d FNsMULd 10 ..... 110100 ..... 0 0111 1001 ..... @d_r_r -FsTOx 10 ..... 110100 00000 0 1000 0001 ..... @r_r2 +FsTOx 10 ..... 110100 00000 0 1000 0001 ..... @d_r2 FdTOx 10 ..... 110100 00000 0 1000 0010 ..... @d_d2 -FqTOx 10 ..... 110100 00000 0 1000 0011 ..... @q_q2 -FxTOs 10 ..... 110100 00000 0 1000 0100 ..... @r_r2 -FxTOd 10 ..... 110100 00000 0 1000 1000 ..... @d_r2 -FxTOq 10 ..... 110100 00000 0 1000 1100 ..... @q_r2 +FqTOx 10 ..... 110100 00000 0 1000 0011 ..... @d_q2 +FxTOs 10 ..... 110100 00000 0 1000 0100 ..... @r_d2 +FxTOd 10 ..... 110100 00000 0 1000 1000 ..... @d_d2 +FxTOq 10 ..... 110100 00000 0 1000 1100 ..... @q_d2 FiTOs 10 ..... 110100 00000 0 1100 0100 ..... @r_r2 FdTOs 10 ..... 110100 00000 0 1100 0110 ..... @r_d2 FqTOs 10 ..... 110100 00000 0 1100 0111 ..... @r_q2 --2.48.1
Quoted 4 lines · Mikael Szreder
Changelog:
v2:
- Corrected a mistake I made in the FqTOx instruction
- Fixed issues in the FsTOx, FxTOs, FxTOd, FxTOq instructions as well
Queued, squashing the two patches together.
r~