This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #15627] Disable SSE for rtld-* objects (tst-xmmymm failure)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]