Commit f78b0f05 authored by Andreas Färber's avatar Andreas Färber Committed by Riku Voipio

linux-user: Fix sa_flags byte swaps for mips

sa_flags is uint32_t for mips{,n32,64}, so don't use tswapal().

edited by Riku Voipio: likewise on alpha
Reported-by: default avatarKhansa Butt <>
Suggested-by: default avatarRichard Henderson <>
Signed-off-by: default avatarAndreas Färber <>
Cc: Ehsan Ul Haq <>
Signed-off-by: default avatarRiku Voipio <>
parent 2aeb36a8
......@@ -587,7 +587,11 @@ int do_sigaction(int sig, const struct target_sigaction *act,
if (oact) {
oact->_sa_handler = tswapal(k->_sa_handler);
#if defined(TARGET_MIPS) || defined (TARGET_ALPHA)
oact->sa_flags = bswap32(k->sa_flags);
oact->sa_flags = tswapal(k->sa_flags);
#if !defined(TARGET_MIPS)
oact->sa_restorer = tswapal(k->sa_restorer);
......@@ -596,7 +600,11 @@ int do_sigaction(int sig, const struct target_sigaction *act,
if (act) {
/* FIXME: This is not threadsafe. */
k->_sa_handler = tswapal(act->_sa_handler);
#if defined(TARGET_MIPS) || defined (TARGET_ALPHA)
k->sa_flags = bswap32(act->sa_flags);
k->sa_flags = tswapal(act->sa_flags);
#if !defined(TARGET_MIPS)
k->sa_restorer = tswapal(act->sa_restorer);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment