about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/le/power9/rtld-strlen.S
diff options
context:
space:
mode:
authorPaul E. Murphy <murphyp@linux.vnet.ibm.com>2020-05-18 11:16:06 -0500
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>2020-06-05 15:30:00 -0500
commita23bd00f9d810c28d9e83ce1d7cf53968375937d (patch)
treead8b0472058d43b628bb9882d999fa3b3514cd7c /sysdeps/powerpc/powerpc64/le/power9/rtld-strlen.S
parent6ef422750985f7e60a8d480f07ecda59e0311fdf (diff)
downloadglibc-a23bd00f9d810c28d9e83ce1d7cf53968375937d.tar.gz
glibc-a23bd00f9d810c28d9e83ce1d7cf53968375937d.tar.xz
glibc-a23bd00f9d810c28d9e83ce1d7cf53968375937d.zip
powerpc64le: add optimized strlen for P9
This started as a trivial change to Anton's rawmemchr.  I got
carried away.  This is a hybrid between P8's asympotically
faster 64B checks with extremely efficient small string checks
e.g <64B (and sometimes a little bit more depending on alignment).

The second trick is to align to 64B by running a 48B checking loop
16B at a time until we naturally align to 64B (i.e checking 48/96/144
bytes/iteration based on the alignment after the first 5 comparisons).
This allieviates the need to check page boundaries.

Finally, explicly use the P7 strlen with the runtime loader when building
P9.  We need to be cautious about vector/vsx extensions here on P9 only
builds.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/le/power9/rtld-strlen.S')
-rw-r--r--sysdeps/powerpc/powerpc64/le/power9/rtld-strlen.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc64/le/power9/rtld-strlen.S b/sysdeps/powerpc/powerpc64/le/power9/rtld-strlen.S
new file mode 100644
index 0000000000..e9d83323ac
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/le/power9/rtld-strlen.S
@@ -0,0 +1 @@
+#include <sysdeps/powerpc/powerpc64/power7/strlen.S>