diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-06-05 07:58:11 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-06-05 07:58:23 -0700 |
commit | 30cb625a21bc7ad450fdc45d1f682e2b27c353de (patch) | |
tree | e104957e2f5bf150b00ad8cb31dbb19e1275dc0f /ChangeLog | |
parent | 7395928b957ebb35afb696c3278d14122aa97b51 (diff) | |
download | glibc-30cb625a21bc7ad450fdc45d1f682e2b27c353de.zip glibc-30cb625a21bc7ad450fdc45d1f682e2b27c353de.tar.gz glibc-30cb625a21bc7ad450fdc45d1f682e2b27c353de.tar.bz2 |
x86-64: Update strlen.S to support wcslen/wcsnlen
The difference between strlen and wcslen is byte vs int. We can
replace pminub and pcmpeqb with pminud and pcmpeqd to turn strlen
into wcslen.
* sysdeps/x86_64/strlen.S (PMINU): New.
(PCMPEQ): Likewise.
(SHIFT_RETURN): Likewise.
(FIND_ZERO): Replace pcmpeqb with PCMPEQ.
(strlen): Add SHIFT_RETURN before ret. Replace pcmpeqb and
pminub with PCMPEQ and PMINU.
* sysdeps/x86_64/wcsnlen.S: New file.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1,5 +1,15 @@ 2017-06-05 H.J. Lu <hongjiu.lu@intel.com> + * sysdeps/x86_64/strlen.S (PMINU): New. + (PCMPEQ): Likewise. + (SHIFT_RETURN): Likewise. + (FIND_ZERO): Replace pcmpeqb with PCMPEQ. + (strlen): Add SHIFT_RETURN before ret. Replace pcmpeqb and + pminub with PCMPEQ and PMINU. + * sysdeps/x86_64/wcsnlen.S: New file. + +2017-06-05 H.J. Lu <hongjiu.lu@intel.com> + * sysdeps/x86_64/memrchr.S (__memrchr): Use 32-bit registers for the lower 32 bits. Remove redundant instructions. |