This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: New optimized string routines for Intel and alignment of stack.
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Carlos O'Donell" <carlos at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 7 Jun 2016 06:13:14 -0700
- Subject: Re: New optimized string routines for Intel and alignment of stack.
- Authentication-results: sourceware.org; auth=none
- References: <57566200 dot 2040203 at redhat dot com>
On Mon, Jun 6, 2016 at 10:56 PM, Carlos O'Donell <carlos@redhat.com> wrote:
> H.J.,
>
> We have had several users that have built legacy applications
> for 32-bit x86 with stack alignment that does not match the
> ABI. In all of these cases it has to do with the application
> having been compiled with -falign-stack=assume-4-byte which
> violates the ABI, usually with icc. However, if you're careful
> it all just works.
>
> The place where it didn't work was with strstr or strcasestr
> when we required the full 16B stack alignment for spilling
> SSE2 registers. The changes to use the *_unaligned variants
> fixed this again and made the routines faster on average.
> This was a win-win.
What did you mean by "use the *_unaligned variants"?
> It seems that unless we have a strong and compelling performance
> argument that continuing to support the *_unaligned variants
> allows some of these legacy applications to run.
>
> Should we do anything to add test cases for these to remind
> us not to break this particular use case without thinking about
> the performance and the application requirements?
>
> --
> Cheers,
> Carlos.
--
H.J.