30cb625a21
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.
8 lines
115 B
ArmAsm
8 lines
115 B
ArmAsm
#define AS_WCSLEN
|
|
#define AS_STRNLEN
|
|
#define strlen __wcsnlen
|
|
|
|
#include "strlen.S"
|
|
|
|
weak_alias(__wcsnlen, wcsnlen)
|