]> 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>
Wed, 19 Feb 2025 11:01:02 +0000 (14:01 +0300)
commit9a51650419a6ce5f343495959cc9661c1027d899
tree6f6224b055f99328dcd48aa5bac723300597e6fd
parent5afb837e3cad49d7cff5e9b46589686a053bee61
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