Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kf8kM-0005QQ-IQ for qemu-devel@nongnu.org; Mon, 15 Sep 2008 03:43:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kf8kL-0005QA-2e for qemu-devel@nongnu.org; Mon, 15 Sep 2008 03:43:45 -0400 Received: from [199.232.76.173] (port=43080 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kf8kK-0005Q7-Tx for qemu-devel@nongnu.org; Mon, 15 Sep 2008 03:43:44 -0400 Received: from savannah.gnu.org ([199.232.41.3]:37324 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kf8kK-0007aW-Ra for qemu-devel@nongnu.org; Mon, 15 Sep 2008 03:43:45 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1Kf8kJ-0001HN-ON for qemu-devel@nongnu.org; Mon, 15 Sep 2008 07:43:43 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1Kf8kJ-0001HI-F9 for qemu-devel@nongnu.org; Mon, 15 Sep 2008 07:43:43 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Mon, 15 Sep 2008 07:43:43 +0000 Subject: [Qemu-devel] [5223] qemu sh4 nptl support Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5223 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5223 Author: aurel32 Date: 2008-09-15 07:43:43 +0000 (Mon, 15 Sep 2008) Log Message: ----------- qemu sh4 nptl support (Michael Trimarchi) Modified Paths: -------------- trunk/configure trunk/linux-user/main.c trunk/linux-user/syscall.c trunk/target-sh4/cpu.h Modified: trunk/configure =================================================================== --- trunk/configure 2008-09-15 07:34:45 UTC (rev 5222) +++ trunk/configure 2008-09-15 07:43:43 UTC (rev 5223) @@ -1437,6 +1437,7 @@ echo "#define TARGET_ARCH \"sh4\"" >> $config_h echo "#define TARGET_SH4 1" >> $config_h bflt="yes" + target_nptl="yes" ;; sparc) echo "TARGET_ARCH=sparc" >> $config_mak Modified: trunk/linux-user/main.c =================================================================== --- trunk/linux-user/main.c 2008-09-15 07:34:45 UTC (rev 5222) +++ trunk/linux-user/main.c 2008-09-15 07:43:43 UTC (rev 5223) @@ -1887,6 +1887,7 @@ switch (trapnr) { case 0x160: + env->pc += 2; ret = do_syscall(env, env->gregs[3], env->gregs[4], @@ -1896,7 +1897,6 @@ env->gregs[0], env->gregs[1]); env->gregs[0] = ret; - env->pc += 2; break; case EXCP_INTERRUPT: /* just indicate that signals should be handled asap */ Modified: trunk/linux-user/syscall.c =================================================================== --- trunk/linux-user/syscall.c 2008-09-15 07:34:45 UTC (rev 5222) +++ trunk/linux-user/syscall.c 2008-09-15 07:43:43 UTC (rev 5223) @@ -53,6 +53,7 @@ //#include #include #include +#include #define termios host_termios #define winsize host_winsize @@ -4662,7 +4663,11 @@ ret = get_errno(fsync(arg1)); break; case TARGET_NR_clone: +#if defined(TARGET_SH4) + ret = get_errno(do_fork(cpu_env, arg1, arg2, arg3, arg5, arg4)); +#else ret = get_errno(do_fork(cpu_env, arg1, arg2, arg3, arg4, arg5)); +#endif break; #ifdef __NR_exit_group /* new thread calls */ Modified: trunk/target-sh4/cpu.h =================================================================== --- trunk/target-sh4/cpu.h 2008-09-15 07:34:45 UTC (rev 5222) +++ trunk/target-sh4/cpu.h 2008-09-15 07:43:43 UTC (rev 5223) @@ -141,6 +141,11 @@ void cpu_sh4_write_mmaped_utlb_addr(CPUSH4State *s, target_phys_addr_t addr, uint32_t mem_value); +static inline void cpu_set_tls(CPUSH4State *env, target_ulong newtls) +{ + env->gbr = newtls; +} + #include "softfloat.h" #define CPUState CPUSH4State