From: Nathan Froyd Date: Mon, 3 Aug 2009 15:43:23 +0000 (-0700) Subject: target-ppc: fix cpu_clone_regs X-Git-Tag: v0.12.0-rc0~1736 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d11f69b20180f14ba596bf78667403fb7b2020db;p=thirdparty%2Fqemu.git target-ppc: fix cpu_clone_regs 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 Signed-off-by: malc --- diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 69c1d580708..148e8c3fe68 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