Message ID | 20190519201953.20161-5-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show |
Series | linux-user: path, clone, sparc, shmat fixes | expand |
Le 19/05/2019 à 22:19, Richard Henderson a écrit : > This value is not, as far as I know, used by any linux software, > but it is set by the kernel and is part of the ABI. > > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > linux-user/alpha/target_cpu.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/linux-user/alpha/target_cpu.h b/linux-user/alpha/target_cpu.h > index 140a459f73..caadb54372 100644 > --- a/linux-user/alpha/target_cpu.h > +++ b/linux-user/alpha/target_cpu.h > @@ -26,10 +26,12 @@ static inline void cpu_clone_regs_child(CPUAlphaState *env, target_ulong newsp) > } > env->ir[IR_V0] = 0; > env->ir[IR_A3] = 0; > + env->ir[IR_A4] = 1; /* OSF/1 secondary return: child */ > } > > static inline void cpu_clone_regs_parent(CPUAlphaState *env) > { > + env->ir[IR_A4] = 0; /* OSF/1 secondary return: parent */ In the kernel, r20 is only set to 0 if !(clone_flags & CLONE_SETTLS), is this a problem here to set it unconditionally? Thanks, Laurent
diff --git a/linux-user/alpha/target_cpu.h b/linux-user/alpha/target_cpu.h index 140a459f73..caadb54372 100644 --- a/linux-user/alpha/target_cpu.h +++ b/linux-user/alpha/target_cpu.h @@ -26,10 +26,12 @@ static inline void cpu_clone_regs_child(CPUAlphaState *env, target_ulong newsp) } env->ir[IR_V0] = 0; env->ir[IR_A3] = 0; + env->ir[IR_A4] = 1; /* OSF/1 secondary return: child */ } static inline void cpu_clone_regs_parent(CPUAlphaState *env) { + env->ir[IR_A4] = 0; /* OSF/1 secondary return: parent */ } static inline void cpu_set_tls(CPUAlphaState *env, target_ulong newtls)
This value is not, as far as I know, used by any linux software, but it is set by the kernel and is part of the ABI. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- linux-user/alpha/target_cpu.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1