From owner-freebsd-arch@FreeBSD.ORG Tue Sep 18 18:07:12 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9134C106564A; Tue, 18 Sep 2012 18:07:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 652FA8FC17; Tue, 18 Sep 2012 18:07:12 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id BB84BB980; Tue, 18 Sep 2012 14:07:11 -0400 (EDT) From: John Baldwin To: freebsd-arch@freebsd.org Date: Tue, 18 Sep 2012 13:59:37 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p17; KDE/4.5.5; amd64; ; ) References: <22549.1347987801@critter.freebsd.dk> In-Reply-To: <22549.1347987801@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201209181359.37965.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 18 Sep 2012 14:07:11 -0400 (EDT) Cc: Konstantin Belousov , attilio@freebsd.org, Poul-Henning Kamp , arch@freebsd.org Subject: Re: Aliasing issue with TAILQ on ppc64 ? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Sep 2012 18:07:12 -0000 On Tuesday, September 18, 2012 1:03:21 pm Poul-Henning Kamp wrote: > In message <20120918164826.GI37286@deviant.kiev.zoral.com.ua>, Konstantin Belou > sov writes: > > >[...] compiler must not reorder accesses which > >provably causes change in the behaviour. > > As I said, I'm not entirely sure why this goes wrong, and I didn't > feel like learning PPC64 assembler constraints just now to find out. > > My understanding is that the cast from entry->head effectively > obscures from the compiler what goes on in this case, making that > optimization fair game. Did you have -fno-strict-aliasing enabled in CFLAGS for your PPC64 build (assuming you had built with -O2 or higher)? -- John Baldwin