aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2021-12-14 12:34:09 +0000
committerAndrew Turner <andrew@FreeBSD.org>2021-12-14 12:34:09 +0000
commitc71bfb101302d0afe8886659c63ada78c6ac37df (patch)
treea8834224d7aa5cfebfbdd7243ed370f9b17661d9
parente50a0a8c44faf8cd155195848dfeab6b390b34ec (diff)
downloadsrc-c71bfb101302d0afe8886659c63ada78c6ac37df.tar.gz
src-c71bfb101302d0afe8886659c63ada78c6ac37df.zip
Revert "Switch to Arm Optimized Routines for mem* & str*"
The Arm Optimized Routines don't exist in 13. I missed this as my builds succeeded, likely due to stale depends files. This reverts commit bfd10d146ba4f8dc26e8b9bb9013a9316105f11a.
-rw-r--r--lib/libc/aarch64/string/Makefile.inc51
-rw-r--r--lib/libc/aarch64/string/memcpy.S6
-rw-r--r--lib/libc/aarch64/string/memmove.S5
-rw-r--r--lib/libc/aarch64/string/strchr.S5
-rw-r--r--lib/libc/aarch64/string/strrchr.S5
5 files changed, 15 insertions, 57 deletions
diff --git a/lib/libc/aarch64/string/Makefile.inc b/lib/libc/aarch64/string/Makefile.inc
index 0e1f0f4b84e2..5ce355f8b0c1 100644
--- a/lib/libc/aarch64/string/Makefile.inc
+++ b/lib/libc/aarch64/string/Makefile.inc
@@ -1,41 +1,20 @@
# $FreeBSD$
#
-# String handling from the Arm Optimized Routines
-# https://github.com/ARM-software/optimized-routines
+# String handling from the Cortex Strings library
+# https://git.linaro.org/toolchain/cortex-strings.git
#
-AARCH64_STRING_FUNCS= \
- memchr \
- memcmp \
- memcpy \
- memmove \
- memrchr \
- memset \
- stpcpy \
- strchr \
- strchrnul \
- strcmp \
- strcpy \
- strlen \
- strncmp \
- strnlen \
- strrchr
+.PATH: ${SRCTOP}/contrib/cortex-strings/src/aarch64
-#
-# Add the above functions. Generate an asm file that includes the needed
-# Arm Optimized Routines file defining the function name to the libc name.
-# Some file need multiple macros defined or a weak symbol added we can
-# override the generated file in these cases.
-#
-.for FUNC in ${AARCH64_STRING_FUNCS}
-.if !exists(${FUNC}.S)
-${FUNC}.S:
- printf '/* %sgenerated by libc/aarch64/string/Makefile.inc */\n' @ > ${.TARGET}
- printf '#define __%s_aarch64 %s\n' ${FUNC} ${FUNC} >> ${.TARGET}
- printf '#include "aarch64/%s.S"\n' ${FUNC} >> ${.TARGET}
-CLEANFILES+= ${FUNC}.S
-.endif
-
-MDSRCS+= ${FUNC}.S
-CFLAGS.${FUNC}.S+=-I${SRCTOP}/contrib/arm-optimized-routines/string
-.endfor
+MDSRCS+= \
+ memchr.S \
+ memcmp.S \
+ memcpy.S \
+ memmove.S \
+ memset.S \
+ strchr.S \
+ strcmp.S \
+ strcpy.S \
+ strlen.S \
+ strncmp.S \
+ strnlen.S
diff --git a/lib/libc/aarch64/string/memcpy.S b/lib/libc/aarch64/string/memcpy.S
deleted file mode 100644
index ac4fbe8d6175..000000000000
--- a/lib/libc/aarch64/string/memcpy.S
+++ /dev/null
@@ -1,6 +0,0 @@
-#define __memcpy_aarch64 memcpy
-#define __memmove_aarch64 memmove
-#include "aarch64/memcpy.S"
-
-.weak index
-.equ index, strchr
diff --git a/lib/libc/aarch64/string/memmove.S b/lib/libc/aarch64/string/memmove.S
deleted file mode 100644
index e2f99790e0da..000000000000
--- a/lib/libc/aarch64/string/memmove.S
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * memmove is implemented in memcpy.S. Having this file simplifies the build
- * as it stops MISRCS from picking up the C implementation and rtld expects
- * to copy the memmove object file into its object directory.
- */
diff --git a/lib/libc/aarch64/string/strchr.S b/lib/libc/aarch64/string/strchr.S
deleted file mode 100644
index e241b35004bb..000000000000
--- a/lib/libc/aarch64/string/strchr.S
+++ /dev/null
@@ -1,5 +0,0 @@
-#define __strchr_aarch64 strchr
-#include "aarch64/strchr.S"
-
-.weak index
-.equ index, strchr
diff --git a/lib/libc/aarch64/string/strrchr.S b/lib/libc/aarch64/string/strrchr.S
deleted file mode 100644
index 46e966e3188a..000000000000
--- a/lib/libc/aarch64/string/strrchr.S
+++ /dev/null
@@ -1,5 +0,0 @@
-#define __strrchr_aarch64 strrchr
-#include "aarch64/strrchr.S"
-
-.weak rindex
-.equ rindex, strrchr