Patchwork [1/7] target-ppc: fix cpu_clone_regs

login
register
mail settings
Submitter Nathan Froyd
Date Aug. 3, 2009, 3:43 p.m.
Message ID <1249314209-10230-2-git-send-email-froydnj@codesourcery.com>
Download mbox | patch
Permalink /patch/30648/
State Superseded
Headers show

Comments

Nathan Froyd - Aug. 3, 2009, 3:43 p.m.
We only need to make sure that the clone syscall looks like it
succeeded, not clobber 60% of the register set.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
---
 target-ppc/cpu.h |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

Patch

diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 69c1d58..148e8c3 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -817,11 +817,9 @@  static inline int cpu_mmu_index (CPUState *env)
 #if defined(CONFIG_USER_ONLY)
 static inline void cpu_clone_regs(CPUState *env, target_ulong newsp)
 {
-    int i;
     if (newsp)
         env->gpr[1] = newsp;
-    for (i = 7; i < 32; i++)
-        env->gpr[i] = 0;
+    env->gpr[3] = 0;
 }
 #endif