mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: Optimized C memset [v2]
Date: Tue, 27 Aug 2013 17:27:02 -0400	[thread overview]
Message-ID: <20130827212702.GX20515@brightrain.aerifal.cx> (raw)
In-Reply-To: <D09784B3-CA98-4F18-A5F2-5463C6A64B90@lightcubesolutions.com>

On Tue, Aug 27, 2013 at 01:28:36PM -0400, Jeremy Huntwork wrote:
> On Aug 27, 2013, at 12:22 PM, Rich Felker <dalias@aerifal.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


  reply	other threads:[~2013-08-27 21:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27  8:30 Optimized C memset Rich Felker
2013-08-27  8:52 ` Jens Gustedt
2013-08-27  9:17   ` Rich Felker
2013-08-27  9:50     ` Jens Gustedt
2013-08-27 14:21       ` Rich Felker
2013-08-27 14:34         ` Luca Barbato
2013-08-27 14:39           ` Rich Felker
2013-08-27 15:20         ` John Spencer
2013-08-27 15:34           ` Rich Felker
2013-08-27 16:22 ` Optimized C memset [v2] Rich Felker
2013-08-27 17:28   ` Jeremy Huntwork
2013-08-27 21:27     ` Rich Felker [this message]
2013-08-28  0:05   ` Andre Renaud
2013-08-28  1:24     ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130827212702.GX20515@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).