]> git.proxmox.com Git - mirror_qemu.git/commitdiff
sparc: reset CPU state on reset
authorBlue Swirl <blauwirbel@gmail.com>
Sat, 10 Mar 2012 17:55:05 +0000 (17:55 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 17 Mar 2012 16:29:57 +0000 (16:29 +0000)
Not strictly accurate for Sparc64 but avoid confusing Valgrind.

Reported-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-sparc/cpu.h
target-sparc/cpu_init.c

index 86f9de6cfe39808b5c3f204717d24f547c74d75b..887adc363187a2f77bf0b69f3e7b1971a77f5e0b 100644 (file)
@@ -415,14 +415,15 @@ struct CPUSPARCState {
 #if !defined(TARGET_SPARC64)
     int      psref;    /* enable fpu */
 #endif
-    target_ulong version;
     int interrupt_index;
-    uint32_t nwindows;
     /* NOTE: we allow 8 more registers to handle wrapping */
     target_ulong regbase[MAX_NWINDOWS * 16 + 8];
 
     CPU_COMMON
 
+    target_ulong version;
+    uint32_t nwindows;
+
     /* MMU regs */
 #if defined(TARGET_SPARC64)
     uint64_t lsu;
index 29132fb995d0cb19c42a569a27ed4d0b1bfda72f..5c03f0b893bdd5a86a5e2ef8109ce6cb412ea834 100644 (file)
@@ -30,6 +30,7 @@ void cpu_state_reset(CPUSPARCState *env)
         log_cpu_state(env, 0);
     }
 
+    memset(env, 0, offsetof(CPUSPARCState, breakpoints));
     tlb_flush(env, 1);
     env->cwp = 0;
 #ifndef TARGET_SPARC64