From owner-freebsd-arch@FreeBSD.ORG Tue Sep 18 17:03:23 2012 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 19C661065672; Tue, 18 Sep 2012 17:03:23 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id C86AB8FC14; Tue, 18 Sep 2012 17:03:22 +0000 (UTC) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 8D90A3B74B; Tue, 18 Sep 2012 17:03:21 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.5/8.14.5) with ESMTP id q8IH3LuT022550; Tue, 18 Sep 2012 17:03:21 GMT (envelope-from phk@phk.freebsd.dk) To: Konstantin Belousov From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 18 Sep 2012 19:48:26 +0300." <20120918164826.GI37286@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1 Date: Tue, 18 Sep 2012 17:03:21 +0000 Message-ID: <22549.1347987801@critter.freebsd.dk> Cc: attilio@freebsd.org, 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 17:03:23 -0000 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. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.