Commit 608999d1 authored by Richard Henderson's avatar Richard Henderson Committed by Laurent Vivier
Browse files

linux-user: Rename cpu_clone_regs to cpu_clone_regs_child



We will need a target-specific hook for adjusting registers
in the parent during clone.  To avoid confusion, rename the
one we have to make it clear it affects the child.

At the same time, pass in the flags from the clone syscall.
We will need them for correct behaviour for Sparc.

Reviewed-by: default avatarLaurent Vivier <laurent@vivier.eu>
Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20191106113318.10226-10-richard.henderson@linaro.org>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent b220cbcf
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -19,7 +19,8 @@
#ifndef AARCH64_TARGET_CPU_H
#define AARCH64_TARGET_CPU_H

static inline void cpu_clone_regs(CPUARMState *env, target_ulong newsp)
static inline void cpu_clone_regs_child(CPUARMState *env, target_ulong newsp,
                                        unsigned flags)
{
    if (newsp) {
        env->xregs[31] = newsp;
+2 −1
Original line number Diff line number Diff line
@@ -19,7 +19,8 @@
#ifndef ALPHA_TARGET_CPU_H
#define ALPHA_TARGET_CPU_H

static inline void cpu_clone_regs(CPUAlphaState *env, target_ulong newsp)
static inline void cpu_clone_regs_child(CPUAlphaState *env, target_ulong newsp,
                                        unsigned flags)
{
    if (newsp) {
        env->ir[IR_SP] = newsp;
+2 −1
Original line number Diff line number Diff line
@@ -41,7 +41,8 @@ static inline unsigned long arm_max_reserved_va(CPUState *cs)
}
#define MAX_RESERVED_VA  arm_max_reserved_va

static inline void cpu_clone_regs(CPUARMState *env, target_ulong newsp)
static inline void cpu_clone_regs_child(CPUARMState *env, target_ulong newsp,
                                        unsigned flags)
{
    if (newsp) {
        env->regs[13] = newsp;
+2 −1
Original line number Diff line number Diff line
@@ -20,7 +20,8 @@
#ifndef CRIS_TARGET_CPU_H
#define CRIS_TARGET_CPU_H

static inline void cpu_clone_regs(CPUCRISState *env, target_ulong newsp)
static inline void cpu_clone_regs_child(CPUCRISState *env, target_ulong newsp,
                                        unsigned flags)
{
    if (newsp) {
        env->regs[14] = newsp;
+2 −1
Original line number Diff line number Diff line
@@ -19,7 +19,8 @@
#ifndef HPPA_TARGET_CPU_H
#define HPPA_TARGET_CPU_H

static inline void cpu_clone_regs(CPUHPPAState *env, target_ulong newsp)
static inline void cpu_clone_regs_child(CPUHPPAState *env, target_ulong newsp,
                                        unsigned flags)
{
    if (newsp) {
        env->gr[30] = newsp;
Loading