[PATCH v2 03/37] target/sparc: Fix do_dc

Richard Henderson posted 37 patches 6 months ago
Maintainers: Aurelien Jarno <aurelien@aurel32.net>, Peter Maydell <peter.maydell@linaro.org>, "Alex Bennée" <alex.bennee@linaro.org>, Laurent Vivier <laurent@vivier.eu>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Artyom Tarasenko <atar4qemu@gmail.com>
[PATCH v2 03/37] target/sparc: Fix do_dc
Posted by Richard Henderson 6 months ago
Apply DFPREG to compute the register number.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/sparc/translate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index 00c2a11353..1eb1a6decf 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -4253,6 +4253,7 @@ static bool do_dc(DisasContext *dc, int rd, int64_t c)
         return true;
     }
 
+    rd = DFPREG(rd);
     tcg_gen_movi_i64(cpu_fpr[rd / 2], c);
     gen_update_fprs_dirty(dc, rd);
     return advance_pc(dc);
-- 
2.34.1
Re: [PATCH v2 03/37] target/sparc: Fix do_dc
Posted by Philippe Mathieu-Daudé 5 months, 3 weeks ago
On 26/5/24 21:42, Richard Henderson wrote:
> Apply DFPREG to compute the register number.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/sparc/translate.c | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>