This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ #15627] Disable SSE for rtld-* objects (tst-xmmymm failure)
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Siddhesh Poyarekar <siddhesh at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 14 Jun 2013 19:57:54 +0200
- Subject: Re: [PATCH][BZ #15627] Disable SSE for rtld-* objects (tst-xmmymm failure)
- References: <20130614104004 dot GH19582 at spoyarek dot pnq dot redhat dot com> <CAMe9rOpbtcumUd8p5gO3qGMeS+Dz8U=fPxE0soods4SzX2tDcw at mail dot gmail dot com>
On Fri, Jun 14, 2013 at 10:13:39AM -0700, H.J. Lu wrote:
> On Fri, Jun 14, 2013 at 3:40 AM, Siddhesh Poyarekar <siddhesh@redhat.com> wrote:
> > Hi,
> >
> > I had mentioned a testsuite regression I had seen in the Fedora
> > rawhide build in another thread. Here are more details on that and a
> > candidate fix.
> >
> > gcc-4.8 seems to be able to vectorize some instructions in rtld-memset
> > on x86_64 (which is essentially string/memset.c), which results in
> > code writing to xmm0. This resulted in the test case failure
> > described in BZ #15627.
> >
> > I had initially written a fix that disables sse when building all
> > rtld-* objects that are to be linked into the dynamic linker. I
> > reckoned however that it was an extreme measure and that we probably
> > ought to be doing it on a case to case basis, based on feedback from
> > the tst-xmmymm test case since writing to xmm/ymm is potentially wrong
> > only in the code paths involving dynamic relocation.
> >
> > The result is the patch below, which applies on top of Roland's
> > sysd-rules patches. I only disable sse for rtld-memset.os, which now
> > results in the test returning clean. I have also verified that other
> > rtld-* objects don't get this flag.
> >
>
> Would it be better to add rtld-memset.S:
>
> mov %rdx, %rcx
> movzbl %sil, %eax
> mov %rdi, %rdx
> rep stosb
> mov %rdx, %rax
> ret
>
> instead?
>
There was already sysdeps/x86_64/multiarch/memset-x86-64.S
I removed it because it was unused.
We could dig it and copy to rtld-memset.S