]> www.infradead.org Git - qemu-nvme.git/commitdiff
target/ppc: Fix register update on lf[sd]u[x]/stf[sd]u[x]
authorMatheus Ferst <matheus.ferst@eldorado.org.br>
Tue, 9 Nov 2021 19:29:11 +0000 (16:29 -0300)
committerCédric Le Goater <clg@kaod.org>
Wed, 10 Nov 2021 07:20:02 +0000 (08:20 +0100)
These instructions should update the GPR indicated by the field RA
instead of RT. This error caused a regression on Mac OS 9 boot and some
graphical glitches in OS X.

Fixes: a39a106634a9 ("target/ppc: Move load and store floating point instructions to decodetree")
Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
target/ppc/translate/fp-impl.c.inc

index d1dbb1b96b162259d87889460846f15e5ad8c318..c9e05201d9e794c067d02f25b5062893da1f076d 100644 (file)
@@ -1328,7 +1328,7 @@ static bool do_lsfpsd(DisasContext *ctx, int rt, int ra, TCGv displ,
         set_fpr(rt, t0);
     }
     if (update) {
-        tcg_gen_mov_tl(cpu_gpr[rt], ea);
+        tcg_gen_mov_tl(cpu_gpr[ra], ea);
     }
     tcg_temp_free_i64(t0);
     tcg_temp_free(ea);