This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Disable 64-bit atomics for MIPS n32 [committed]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Date: Wed, 28 Jan 2015 18:45:15 +0000
- Subject: Disable 64-bit atomics for MIPS n32 [committed]
- Authentication-results: sourceware.org; auth=none
This patch disables use of 64-bit atomics for MIPS n32 to fix the
problems with unaligned semaphores.
Before 64-bit atomics are used for anything for which such alignment
issues do not arise, and before the addition of any new ILP32 ports
with 64-bit semaphores for which the ABI can be set to have the
greater alignment (AARCH64?), a better approach will need to be
established that allows architectures to declare their 64-bit atomics
availability accurately, without doing so causing inappropriate use of
such atomics on unaligned semaphores.
Tested for MIPS n32 that this fixes the nptl/tst-sem3 failure.
Committed.
2015-01-28 Joseph Myers <joseph@codesourcery.com>
* sysdeps/mips/bits/atomic.h [_MIPS_SIM == _ABIN32]
(__HAVE_64B_ATOMICS): Define to 0.
diff --git a/sysdeps/mips/bits/atomic.h b/sysdeps/mips/bits/atomic.h
index ddcb039..a391881 100644
--- a/sysdeps/mips/bits/atomic.h
+++ b/sysdeps/mips/bits/atomic.h
@@ -44,7 +44,7 @@ typedef uintmax_t uatomic_max_t;
#define MIPS_PUSH_MIPS2
#endif
-#if _MIPS_SIM == _ABIO32
+#if _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32
#define __HAVE_64B_ATOMICS 0
#else
#define __HAVE_64B_ATOMICS 1
--
Joseph S. Myers
joseph@codesourcery.com