From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtKSI-0007th-Gc for qemu-devel@nongnu.org; Fri, 03 Feb 2012 09:49:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtKSF-0001VF-KQ for qemu-devel@nongnu.org; Fri, 03 Feb 2012 09:49:38 -0500 Received: from afflict.kos.to ([92.243.29.197]:49799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtKSF-0001TU-5l for qemu-devel@nongnu.org; Fri, 03 Feb 2012 09:49:35 -0500 From: riku.voipio@linaro.org Date: Fri, 3 Feb 2012 16:49:32 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 19/19] linux-user: Fix sa_flags byte swaps for mips List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Ehsan Ul Haq , =?UTF-8?q?Andreas=20F=C3=A4rber?= From: Andreas F=C3=A4rber sa_flags is uint32_t for mips{,n32,64}, so don't use tswapal(). edited by Riku Voipio: likewise on alpha Reported-by: Khansa Butt Suggested-by: Richard Henderson Signed-off-by: Andreas F=C3=A4rber Cc: Ehsan Ul Haq Signed-off-by: Riku Voipio --- linux-user/signal.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index ded12ca..79a39dc 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -587,7 +587,11 @@ int do_sigaction(int sig, const struct target_sigact= ion *act, #endif if (oact) { oact->_sa_handler =3D tswapal(k->_sa_handler); +#if defined(TARGET_MIPS) || defined (TARGET_ALPHA) + oact->sa_flags =3D bswap32(k->sa_flags); +#else oact->sa_flags =3D tswapal(k->sa_flags); +#endif #if !defined(TARGET_MIPS) oact->sa_restorer =3D tswapal(k->sa_restorer); #endif @@ -596,7 +600,11 @@ int do_sigaction(int sig, const struct target_sigact= ion *act, if (act) { /* FIXME: This is not threadsafe. */ k->_sa_handler =3D tswapal(act->_sa_handler); +#if defined(TARGET_MIPS) || defined (TARGET_ALPHA) + k->sa_flags =3D bswap32(act->sa_flags); +#else k->sa_flags =3D tswapal(act->sa_flags); +#endif #if !defined(TARGET_MIPS) k->sa_restorer =3D tswapal(act->sa_restorer); #endif --=20 1.7.5.4