From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RarZP-0003aT-U2 for qemu-devel@nongnu.org; Wed, 14 Dec 2011 11:20:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RarZK-0003xS-C8 for qemu-devel@nongnu.org; Wed, 14 Dec 2011 11:20:39 -0500 Received: from mail-qw0-f52.google.com ([209.85.216.52]:37581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RarZK-0003xC-9t for qemu-devel@nongnu.org; Wed, 14 Dec 2011 11:20:34 -0500 Received: by qadc11 with SMTP id c11so644237qad.4 for ; Wed, 14 Dec 2011 08:20:33 -0800 (PST) Sender: Richard Henderson Message-ID: <4EE8CCCE.8010108@twiddle.net> Date: Wed, 14 Dec 2011 08:20:30 -0800 From: Richard Henderson MIME-Version: 1.0 References: <1323321912-15922-1-git-send-email-khansa@kics.edu.pk> <1323321912-15922-4-git-send-email-khansa@kics.edu.pk> In-Reply-To: <1323321912-15922-4-git-send-email-khansa@kics.edu.pk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/3] linux-user:Signal handling for MIPS64 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: khansa@kics.edu.pk Cc: peter.maydell@linaro.org, riku.voipio@iki.fi, qemu-devel@nongnu.org, aurelien@aurel32.net On 12/07/2011 09:25 PM, khansa@kics.edu.pk wrote: > +#if defined(TARGET_MIPS64) > + /* tswapal() do 64 bit swap in case of MIPS64 but > + we need 32 bit swap as sa_flags is 32 bit */ > + k->sa_flags = bswap32(act->sa_flags); > +#else > k->sa_flags = tswapal(act->sa_flags); > +#endif The condition in syscall_defs.h is TARGET_MIPS, not TARGET_MIPS64. They should match, despite the fact that it doesn't actually matter for the 32-bit abis. > #elif defined(TARGET_ABI_MIPSN64) > > -# warning signal handling not implemented > +struct target_sigcontext { > + uint32_t sc_regmask; /* Unused */ > + uint32_t sc_status; There's no reason to duplicate all this code. Yes, when someone wrote this in the first place, they wrote separate sectons for each mips abi. However, as you can see that huge portions of this block are identical, this was obviously a mistake. Start by changing the original section to #elif defined(TARGET_MIPS) and see what needs changing specifically for the ABIs. I'm not even sure there are any differences at all. r~