From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94591 invoked by alias); 13 Apr 2017 17:16:56 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 94580 invoked by uid 89); 13 Apr 2017 17:16:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*M:218, guaranteed X-HELO: mx1.redhat.com DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9DF417E9D2 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=triegel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9DF417E9D2 Message-ID: <1492103812.5374.218.camel@redhat.com> Subject: Re: __HAVE_64B_ATOMICS and alignment From: Torvald Riegel To: Florian Weimer Cc: GNU C Library Date: Thu, 13 Apr 2017 17:16:00 -0000 In-Reply-To: References: <430bd9b7-a6fd-7247-7b60-965bd0486bbf@redhat.com> <1480333887.7146.1635.camel@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-04/txt/msg00240.txt.bz2 On Thu, 2017-04-13 at 07:10 +0200, Florian Weimer wrote: > On 11/28/2016 12:51 PM, Torvald Riegel wrote: > >> This means that for an LP32 architecture such as i686 which could > >> conceivable provide 64-bit atomics, we might try to perform an atomic > >> operation on a potentially misaligned uint64_t value. > > i686 has no 64b atomic loads or stores. > > double loads and stores via the FPU are atomic, and they preserve all > bit patterns. I believe that the precise status on this is that we believe that they are atomic, but it's not explicitly guaranteed. Either way, glibc does not provide 64b atomics on i686. If we would change that, we would have to review data structure declarations, including alignment, of data that could be the target of such 64b atomics.