/* Optimized strnlen implementation for PowerPC64/POWER7 using cmpb insn.
- Copyright (C) 2010-2013 Free Software Foundation, Inc.
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
Contributed by Luis Machado <luisgpm@br.ibm.com>.
This file is part of the GNU C Library.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#include <sysdep.h>
+#ifndef STRNLEN
+# define STRNLEN __strnlen
+#endif
+
/* int [r3] strnlen (char *s [r3], int size [r4]) */
.machine power7
-ENTRY (__strnlen)
+ENTRY_TOCLESS (STRNLEN)
CALL_MCOUNT 2
dcbt 0,r3
clrrdi r8,r3,3
mr r3,r4
blr
-END (__strnlen)
+END (STRNLEN)
+libc_hidden_def (__strnlen)
weak_alias (__strnlen, strnlen)
-libc_hidden_builtin_def (strnlen)
+libc_hidden_def (strnlen)