This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
New optimized string routines for Intel and alignment of stack.
- From: Carlos O'Donell <carlos at redhat dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Tue, 7 Jun 2016 01:56:16 -0400
- Subject: New optimized string routines for Intel and alignment of stack.
- Authentication-results: sourceware.org; auth=none
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.
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.