From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O0PEz-0005gn-EJ for qemu-devel@nongnu.org; Fri, 09 Apr 2010 21:12:05 -0400 Received: from [140.186.70.92] (port=38799 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0PEx-0005gH-E5 for qemu-devel@nongnu.org; Fri, 09 Apr 2010 21:12:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O0PEu-0005Cg-13 for qemu-devel@nongnu.org; Fri, 09 Apr 2010 21:12:03 -0400 Received: from hall.aurel32.net ([88.191.82.174]:44005) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0PEt-0005CZ-Rx for qemu-devel@nongnu.org; Fri, 09 Apr 2010 21:11:59 -0400 Date: Sat, 10 Apr 2010 02:54:46 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 10/13] target-alpha: Enable NPTL. Message-ID: <20100410005446.GW21042@volta.aurel32.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org On Wed, Mar 24, 2010 at 05:13:07PM -0700, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > configure | 1 + > linux-user/syscall.c | 2 +- > target-alpha/cpu.h | 28 +++++++++++++++++----------- > 3 files changed, 19 insertions(+), 12 deletions(-) > > diff --git a/configure b/configure > index 1d5fb17..37f2ba7 100755 > --- a/configure > +++ b/configure > @@ -2430,6 +2430,7 @@ case "$target_arch2" in > ;; > alpha) > target_phys_bits=64 > + target_nptl="yes" > ;; > arm|armeb) > TARGET_ARCH=arm > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index a03e432..050a418 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -5768,7 +5768,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, > ret = get_errno(fsync(arg1)); > break; > case TARGET_NR_clone: > -#if defined(TARGET_SH4) > +#if defined(TARGET_SH4) || defined(TARGET_ALPHA) > ret = get_errno(do_fork(cpu_env, arg1, arg2, arg3, arg5, arg4)); > #elif defined(TARGET_CRIS) > ret = get_errno(do_fork(cpu_env, arg2, arg1, arg3, arg4, arg5)); > diff --git a/target-alpha/cpu.h b/target-alpha/cpu.h > index 8afe16d..3dd9888 100644 > --- a/target-alpha/cpu.h > +++ b/target-alpha/cpu.h > @@ -411,15 +411,6 @@ static inline int cpu_mmu_index (CPUState *env) > return (env->ps >> 3) & 3; > } > > -#if defined(CONFIG_USER_ONLY) > -static inline void cpu_clone_regs(CPUState *env, target_ulong newsp) > -{ > - if (newsp) > - env->ir[30] = newsp; > - /* FIXME: Zero syscall return value. */ > -} > -#endif > - > #include "cpu-all.h" > #include "exec-all.h" > > @@ -477,7 +468,7 @@ enum { > IR_S4 = 13, > IR_S5 = 14, > IR_S6 = 15, > -#define IR_FP IR_S6 > + IR_FP = IR_S6, > IR_A0 = 16, > IR_A1 = 17, > IR_A2 = 18, > @@ -490,7 +481,7 @@ enum { > IR_T11 = 25, > IR_RA = 26, > IR_T12 = 27, > -#define IR_PV IR_T12 > + IR_PV = IR_T12, > IR_AT = 28, > IR_GP = 29, > IR_SP = 30, > @@ -531,4 +522,19 @@ static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc, > *flags = env->ps; > } > > +#if defined(CONFIG_USER_ONLY) > +static inline void cpu_clone_regs(CPUState *env, target_ulong newsp) > +{ > + if (newsp) > + env->ir[IR_SP] = newsp; You need curly braces here. > + env->ir[IR_V0] = 0; > + env->ir[IR_A3] = 0; > +} > + > +static inline void cpu_set_tls(CPUState *env, target_ulong newtls) > +{ > + env->unique = newtls; > +} > +#endif > + > #endif /* !defined (__CPU_ALPHA_H__) */ > -- > 1.6.6.1 > > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net