This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Disable 64-bit atomics for MIPS n32 [committed]
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Joseph Myers <joseph at codesourcery dot com>, Torvald Riegel <triegel at redhat dot com>, Chris Metcalf <cmetcalf at tilera dot com>, Andrew Pinski <pinskia at gmail dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 28 Jan 2015 17:26:17 -0500
- Subject: Re: Disable 64-bit atomics for MIPS n32 [committed]
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1501281844510 dot 16983 at digraph dot polyomino dot org dot uk> <1422480679 dot 29655 dot 187 dot camel at triegel dot csb> <alpine dot DEB dot 2 dot 10 dot 1501282158550 dot 5951 at digraph dot polyomino dot org dot uk>
On 01/28/2015 05:05 PM, Joseph Myers wrote:
> My view is: only use atomic operations on properly aligned values, define
> SEM_USE_64B_ATOMICS or similar to 1 if __HAVE_64B_ATOMICS && (defined
> _LP64 || !SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_22)) to reflect
> that new ILP32 ports added in 2.22 and later (such as AArch64 ILP32)
> should define their semaphores to be 8-byte-aligned. (Presuming that such
> ports should indeed prefer to use the 64-bit atomics here.) And maybe
> then allow ports to override that choice.
I agree with Joseph's view.
The only thing I would add is that we need to be very clear that new
64-bit ILP32 ports need to get the ABI right to easily use 64-bit atomics.
The headers should reinforce this by failing to compile if the port doesn't
make explicit definitions.
I think such a solution plus a combination of the patches Chris Metcalf
worked on is likely going to be the final solution we put in place for
2.22.
Cheers,
Carlos.