qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-ppc] [PATCH 1/4] ppc: change CPUPPCState access_type from int to u


From: Mark Cave-Ayland
Subject: [Qemu-ppc] [PATCH 1/4] ppc: change CPUPPCState access_type from int to uint8_t
Date: Sun, 10 Sep 2017 15:37:32 +0100

This change was suggested by Alexey in advance of a subsequent commit which
adds access_type into vmstate_ppc_cpu.

Signed-off-by: Mark Cave-Ayland <address@hidden>
---
 target/ppc/cpu.h     |    4 ++--
 target/ppc/machine.c |    4 +++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index 12f0949..59d1656 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -1010,8 +1010,8 @@ struct CPUPPCState {
     /* Next instruction pointer */
     target_ulong nip;
 
-    int access_type; /* when a memory exception occurs, the access
-                        type is stored here */
+    uint8_t access_type; /* when a memory exception occurs, the access
+                            type is stored here */
 
     CPU_COMMON
 
diff --git a/target/ppc/machine.c b/target/ppc/machine.c
index e36b710..e59049f 100644
--- a/target/ppc/machine.c
+++ b/target/ppc/machine.c
@@ -19,6 +19,7 @@ static int cpu_load_old(QEMUFile *f, void *opaque, int 
version_id)
     target_ulong sdr1;
     uint32_t fpscr;
     target_ulong xer;
+    int access_type;
 
     for (i = 0; i < 32; i++)
         qemu_get_betls(f, &env->gpr[i]);
@@ -46,7 +47,8 @@ static int cpu_load_old(QEMUFile *f, void *opaque, int 
version_id)
     }
     qemu_get_be32s(f, &fpscr);
     env->fpscr = fpscr;
-    qemu_get_sbe32s(f, &env->access_type);
+    qemu_get_sbe32s(f, &access_type);
+    env->access_type = (uint8_t)access_type;
 #if defined(TARGET_PPC64)
     qemu_get_betls(f, &env->spr[SPR_ASR]);
     qemu_get_sbe32s(f, &env->slb_nr);
-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]