]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/sparc: Fix gdbstub incorrectly handling registers f32-f62
authorMikael Szreder <git@miszr.win>
Fri, 14 Feb 2025 07:03:43 +0000 (08:03 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 22 Mar 2025 07:52:51 +0000 (10:52 +0300)
commit5af648acff28171d34a68aec4cf0f52e6401284c
treef146d975c29290c989e17f3c36b101f5ca381660
parent0c34f9feee0d188d2573e3bb08d5926d8003550b
target/sparc: Fix gdbstub incorrectly handling registers f32-f62

The gdbstub implementation for the Sparc architecture would
incorrectly calculate the the floating point register offset.
This resulted in, for example, registers f32 and f34 to point to
the same value.

The issue was caused by the confusion between even register numbers
and even register indexes. For example, the register index of f32 is 64
and f34 is 65.

Cc: qemu-stable@nongnu.org
Fixes: 30038fd81808 ("target-sparc: Change fpr representation to doubles.")
Signed-off-by: Mikael Szreder <git@miszr.win>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250214070343.11501-1-git@miszr.win>
(cherry picked from commit 7a74e468089a58756b438d31a2a9a97f183780d7)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/sparc/gdbstub.c