From: Richard Henderson Date: Thu, 21 Apr 2022 15:16:33 +0000 (-0700) Subject: linux-user/nios2: Fix clone child return X-Git-Tag: v7.1.0-rc0~128^2~66 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42192df83a8eef033b6522989a14fd4a584d6f85;p=thirdparty%2Fqemu.git linux-user/nios2: Fix clone child return The child side of clone needs to set the secondary syscall return value, r7, to indicate syscall success. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-Id: <20220421151735.31996-3-richard.henderson@linaro.org> --- diff --git a/linux-user/nios2/target_cpu.h b/linux-user/nios2/target_cpu.h index 2d2008f0026..830b4c0741c 100644 --- a/linux-user/nios2/target_cpu.h +++ b/linux-user/nios2/target_cpu.h @@ -27,6 +27,7 @@ static inline void cpu_clone_regs_child(CPUNios2State *env, target_ulong newsp, env->regs[R_SP] = newsp; } env->regs[R_RET0] = 0; + env->regs[7] = 0; } static inline void cpu_clone_regs_parent(CPUNios2State *env, unsigned flags)