Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130827212702.GX20515@brightrain.aerifal.cx>
Date: Tue, 27 Aug 2013 17:27:02 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: Optimized C memset [v2]

On Tue, Aug 27, 2013 at 01:28:36PM -0400, Jeremy Huntwork wrote:
> On Aug 27, 2013, at 12:22 PM, Rich Felker <dalias@...ifal.cx> wrote:
> 
> > Here's version 2 (filename version 6, in honor of glibc ;) of the
> > memset code. I fixed a bug in the logic for coverage of the tail (the
> > part past what's covered by the loop) for some values of n and
> > alignments, and cleaned up the __GNUC__ usage a bit to use less
> > #ifdeffery. The remaining test at the top for the __GNUC__ version is
> > ugly, I admit, and should possibly just be removed and replaced by a
> > configure check to add -D__may_alias__= to the CFLAGS if the compiler
> > defines __GNUC__ but does not recognize __attribute__((__may_alias__))
> > -- opinions on this?
> 
> 
> Doing the test via configure and setting a flag seems more
> consistent with comments that have been made elsewhere on this list
> about the correct way to feature test.

Agreed. Also, clang/LLVM seems to still be lacking may_alias:

http://llvm.org/bugs/show_bug.cgi?id=11082

I'm not really worried about the semantic problem, since this is just
about the most harmless type of aliasing you can have, and we're
already using it (without proper annotations for the compiler) anyway.
But I don't want build regressions. So I'll whip up something for
configure...

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.