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: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 14 Jun 2013 10:13:39 -0700
- 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>
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?
--
H.J.