[PATCH 06/11] target/ppc: updated vscr manipulation in machine.c

Bruno Larsen (billionai) posted 11 patches 4 years, 9 months ago
There is a newer version of this series
[PATCH 06/11] target/ppc: updated vscr manipulation in machine.c
Posted by Bruno Larsen (billionai) 4 years, 9 months ago
Updated the code in machine.c to use the generic ppc_{store,get}_vscr
instead of helper style functions, so it can build without TCG

Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br>
---
 target/ppc/machine.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/target/ppc/machine.c b/target/ppc/machine.c
index e5bffbe365..93972df58e 100644
--- a/target/ppc/machine.c
+++ b/target/ppc/machine.c
@@ -8,7 +8,6 @@
 #include "qapi/error.h"
 #include "qemu/main-loop.h"
 #include "kvm_ppc.h"
-#include "exec/helper-proto.h"
 
 static void post_load_update_msr(CPUPPCState *env)
 {
@@ -107,7 +106,7 @@ static int cpu_load_old(QEMUFile *f, void *opaque, int version_id)
         ppc_store_sdr1(env, sdr1);
     }
     qemu_get_be32s(f, &vscr);
-    helper_mtvscr(env, vscr);
+    ppc_store_vscr(env, vscr);
     qemu_get_be64s(f, &env->spe_acc);
     qemu_get_be32s(f, &env->spe_fscr);
     qemu_get_betls(f, &env->msr_mask);
@@ -456,7 +455,7 @@ static int get_vscr(QEMUFile *f, void *opaque, size_t size,
                     const VMStateField *field)
 {
     PowerPCCPU *cpu = opaque;
-    helper_mtvscr(&cpu->env, qemu_get_be32(f));
+    ppc_store_vscr(&cpu->env, qemu_get_be32(f));
     return 0;
 }
 
@@ -464,7 +463,7 @@ static int put_vscr(QEMUFile *f, void *opaque, size_t size,
                     const VMStateField *field, JSONWriter *vmdesc)
 {
     PowerPCCPU *cpu = opaque;
-    qemu_put_be32(f, helper_mfvscr(&cpu->env));
+    qemu_put_be32(f, ppc_get_vscr(&cpu->env));
     return 0;
 }
 
-- 
2.17.1


Re: [PATCH 06/11] target/ppc: updated vscr manipulation in machine.c
Posted by Richard Henderson 4 years, 9 months ago
On 5/12/21 9:08 AM, Bruno Larsen (billionai) wrote:
> Updated the code in machine.c to use the generic ppc_{store,get}_vscr
> instead of helper style functions, so it can build without TCG
> 
> Signed-off-by: Bruno Larsen (billionai)<bruno.larsen@eldorado.org.br>
> ---
>   target/ppc/machine.c | 7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)

Squash this into patch 1.


r~

Re: [PATCH 06/11] target/ppc: updated vscr manipulation in machine.c
Posted by David Gibson 4 years, 9 months ago
On Wed, May 12, 2021 at 12:08:52PM -0500, Richard Henderson wrote:
> On 5/12/21 9:08 AM, Bruno Larsen (billionai) wrote:
> > Updated the code in machine.c to use the generic ppc_{store,get}_vscr
> > instead of helper style functions, so it can build without TCG
> > 
> > Signed-off-by: Bruno Larsen (billionai)<bruno.larsen@eldorado.org.br>
> > ---
> >   target/ppc/machine.c | 7 +++----
> >   1 file changed, 3 insertions(+), 4 deletions(-)
> 
> Squash this into patch 1.

Or don't since I already applied patch 1.  I've applied this one as
well.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson