diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-01-31 15:46:08 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-02-06 16:19:35 -0300 |
commit | 30c1dfde313fa01e195e0759915f1356effdb7d6 (patch) | |
tree | 7a94f097603e6f23d86bc644ab1df577b3006cb6 /sysdeps | |
parent | 367c31b5d61164db97834917f5487094ebef2f58 (diff) | |
download | glibc-30c1dfde313fa01e195e0759915f1356effdb7d6.tar.gz |
string: Improve generic stpcpy
It follows the strategy:
- Align the destination on word boundary using byte operations.
- If source is also word aligned, read a word per time, check for
null (using has_zero from string-fzb.h), and write the remaining
bytes.
- If source is not word aligned, loop by aligning the source, and
merging the result of two reads. Similar to aligned case,
check for null with has_zero, and write the remaining bytes if
null is found.
Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc64-linux-gnu,
and powerpc-linux-gnu by removing the arch-specific assembly
implementation and disabling multi-arch (it covers both LE and BE
for 64 and 32 bits).
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
Diffstat (limited to 'sysdeps')
0 files changed, 0 insertions, 0 deletions