Aliasing issue with TAILQ on ppc64 ?

John Baldwin jhb at freebsd.org
Tue Sep 18 18:07:12 UTC 2012


On Tuesday, September 18, 2012 1:03:21 pm Poul-Henning Kamp wrote:
> In message <20120918164826.GI37286 at 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


More information about the freebsd-arch mailing list