linux-alpha.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Matt Turner <mattst88@gmail.com>
Cc: Carlos O'Donell <carlos@systemhalted.org>,
	debian-alpha@lists.debian.org, debian-glibc@lists.debian.org,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	Richard Henderson <rth7680@gmail.com>,
	linux-alpha@vger.kernel.org
Subject: Re: Help on memchr() EGLIBC assembly code
Date: Tue, 14 Jul 2009 00:24:04 +0200	[thread overview]
Message-ID: <20090713222404.GA16997@hall.aurel32.net> (raw)
In-Reply-To: <b4198de60907131516t384446e6na6cf15e7ebb1fc83@mail.gmail.com>

On Mon, Jul 13, 2009 at 07:16:16PM -0300, Matt Turner wrote:
> On Mon, Jul 13, 2009 at 6:17 PM, Aurelien Jarno<aurelien@aurel32.net> wrote:
> > On Mon, Jul 13, 2009 at 02:24:00PM -0400, Carlos O'Donell wrote:
> >> On Mon, Jul 13, 2009 at 1:31 PM, Aurelien Jarno<aurelien@aurel32.net> wrote:
> >> > With a lot of patches (E)GLIBC 2.10 builds on alpha, but it fails on the
> >> > testsuite for the memchr() function, which is an optimized assembly code
> >> > on alpha. Unfortunately I don't speak alpha assembly very well, so help
> >> > is needed.
> >> >
> >> > The problem is that the memchr() function on alpha uses prefetch, which
> >> > can cause a page boundary to be crossed, while the standards (POSIX and
> >> > C99) says it should stop when a match is found.
> >> >
> >> > I have built a small testcase (see file attached), which contains the
> >> > code to trigger the bug and the assembly code of the memchr() function,
> >> > copied from EGLIBC.
> >> >
> >> > It would be nice if someone can fix the assembly code so that the
> >> > prefetching does not create memory faults. Thanks in advance.
> >>
> >> If you remove:
> >> ./sysdeps/alpha/alphaev6/memchr.S
> >> ./sysdeps/alpha/memchr.S
> >> and allow the build to fallback on string/memchr.c do the tests pass?
> >>
> >> You can always add memchr.S routines back in a later release if you
> >> need an immediate workaround.
> >
> > Yeah, it works, and that's actually my plan if I get no answer. But I
> > would really like to see this fixed now, as otherwise, it will most
> > probably stay like that indefinitely.
> >
> > --
> > Aurelien Jarno                          GPG: 1024D/F1BCDB73
> > aurelien@aurel32.net                 http://www.aurel32.net
> >
> 
> I'm copying Richard Henderson and Ivan Kokshayshy on this, as they are
> without a doubt the most knowledgeable people about this sort of
> thing.

Thanks.

> As an aside, please make sure these two bugs are fixed in eglibc (I
> don't know if they exist in eglibc, but I do realize that you filed
> them against glibc yourself -- so this is just a reminder).
> 
> http://sources.redhat.com/bugzilla/show_bug.cgi?id=5350
> http://sources.redhat.com/bugzilla/show_bug.cgi?id=5400
> 

I have already put a first set of patches needed for alpha in a git
repository [1], and sent a pull request on the libc-ports mailing list.
I hope it will work better than filling bug reports. If it also fails,
I'll send them to EGLIBC.

[1]
http://git.aurel32.net/?p=glibc-ports.git;a=shortlog;h=refs/heads/alpha-for-upstream

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net


-- 
To UNSUBSCRIBE, email to debian-glibc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


  reply	other threads:[~2009-07-13 22:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090713173104.GA13883@hall.aurel32.net>
     [not found] ` <119aab440907131124r3fd333d3n967cdde2cf3c2e1b@mail.gmail.com>
     [not found]   ` <20090713211723.GE10110@hall.aurel32.net>
2009-07-13 22:16     ` Help on memchr() EGLIBC assembly code Matt Turner
2009-07-13 22:24       ` Aurelien Jarno [this message]
2009-07-15 19:48       ` Richard Henderson
2009-07-19 14:29         ` Aurelien Jarno
2009-07-26 23:45           ` Aurelien Jarno
2009-07-27  9:29             ` Aurelien Jarno
2009-07-30  0:24             ` Richard Henderson
2009-07-30 16:29               ` Aurelien Jarno
2009-07-31 23:25                 ` Richard Henderson

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=20090713222404.GA16997@hall.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=carlos@systemhalted.org \
    --cc=debian-alpha@lists.debian.org \
    --cc=debian-glibc@lists.debian.org \
    --cc=ink@jurassic.park.msu.ru \
    --cc=linux-alpha@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=rth7680@gmail.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.
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).