From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RfrOC-0005EQ-4r for qemu-devel@nongnu.org; Wed, 28 Dec 2011 06:09:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RfrO6-0005dV-97 for qemu-devel@nongnu.org; Wed, 28 Dec 2011 06:09:44 -0500 Received: from mail-we0-f173.google.com ([74.125.82.173]:35553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RfrO6-0005dH-4q for qemu-devel@nongnu.org; Wed, 28 Dec 2011 06:09:38 -0500 Received: by werb10 with SMTP id b10so6730292wer.4 for ; Wed, 28 Dec 2011 03:09:36 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <4EE8CCCE.8010108@twiddle.net> References: <1323321912-15922-1-git-send-email-khansa@kics.edu.pk> <1323321912-15922-4-git-send-email-khansa@kics.edu.pk> <4EE8CCCE.8010108@twiddle.net> Date: Wed, 28 Dec 2011 16:09:36 +0500 Message-ID: From: Khansa Butt Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: Richard Henderson , qemu-devel@nongnu.org On Wed, Dec 14, 2011 at 9:20 PM, Richard Henderson wrote: > On 12/07/2011 09:25 PM, khansa@kics.edu.pk wrote: >> +#if defined(TARGET_MIPS64) >> + =A0 =A0 =A0 =A0/* tswapal() do 64 bit swap in case of MIPS64 but >> + =A0 =A0 =A0 =A0 =A0 we need 32 bit swap as sa_flags is 32 bit */ >> + =A0 =A0 =A0 =A0k->sa_flags =3D bswap32(act->sa_flags); >> +#else >> =A0 =A0 =A0 =A0 =A0k->sa_flags =3D 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. > actually sa_flags is 32 bit for MIPS64 but tswapal calls tswap64() as TARGET_LONG_SIZE !=3D 4 in case of MIPS64( see cpu-all.h) hence sa_flags has wrong value at the end so I used above hunk >> =A0#elif defined(TARGET_ABI_MIPSN64) >> >> -# warning signal handling not implemented >> +struct target_sigcontext { >> + =A0 =A0uint32_t =A0 sc_regmask; =A0 =A0 /* Unused */ >> + =A0 =A0uint32_t =A0 sc_status; > > There's no reason to duplicate all this code. =A0Yes, 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. =A0I'm not even > sure there are any differences at all. > > > r~