aboutsummaryrefslogtreecommitdiff
path: root/linux-user/nios2
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-04-21 08:16:33 -0700
committerRichard Henderson <richard.henderson@linaro.org>2022-04-26 08:16:40 -0700
commit42192df83a8eef033b6522989a14fd4a584d6f85 (patch)
tree94e4787c16e08c04b37383284b0f44892e693228 /linux-user/nios2
parent892d0f4afb2614603157600e9d5d0aaa878b5d31 (diff)
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 <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220421151735.31996-3-richard.henderson@linaro.org>
Diffstat (limited to 'linux-user/nios2')
-rw-r--r--linux-user/nios2/target_cpu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/linux-user/nios2/target_cpu.h b/linux-user/nios2/target_cpu.h
index 2d2008f002..830b4c0741 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)