New optimized string routines for Intel and alignment of stack.
H.J. Lu
hjl.tools@gmail.com
Tue Jun 7 13:13:00 GMT 2016
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.
More information about the Libc-alpha
mailing list