This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Neon assumption in strchrnul and strrchr
- From: Siddhesh Poyarekar <sid at reserved-bit dot com>
- To: Richard Earnshaw <rearnsha at arm dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Tue, 2 Feb 2016 21:06:13 +0530
- Subject: Neon assumption in strchrnul and strrchr
- Authentication-results: sourceware.org; auth=none
Hi Richard,
I came across the aarch64 implementations of strrchr and strchrnul and
noticed that they assume that advsimd is available. While advsimd is
standard in armv8-a, it seems wrong given that one could compiler code
using -mcpu=cortex-a57-nosimd. Any code that is statically compiled
in this manner would assume that the binary never uses neon, but if
the code calls any of these two functions, that assumption would be
invalid.
Shouldn't this be considered a bug and maybe a default implementation
be put in that does not make this assumption and sticks to using the
standard instruction set?
See also the discussion on lkml[1] on emulating mrs, which should
allow us to deploy such advsimd-based routines from an ifunc in
future.
Siddhesh
[1] http://comments.gmane.org/gmane.linux.ports.arm.kernel/472258