@@ -58,6 +58,7 @@
/* Type to use for aligned memory operations. */
#include <string-optype.h>
+#include <string-opthr.h>
#define OPSIZ (sizeof(op_t))
@@ -190,9 +191,6 @@ extern void _wordcopy_bwd_dest_aligned (long int, long int, size_t)
#endif
-/* Threshold value for when to enter the unrolled loops. */
-#define OP_T_THRES 16
-
/* Set to 1 if memcpy is safe to use for forward-copying memmove with
overlapping addresses. This is 0 by default because memcpy implementations
are generally not safe for overlapping addresses. */
new file mode 100644
@@ -0,0 +1,25 @@
+/* string-opthr.h -- Define a threshold for word access. Generic version.
+ Copyright (C) 2016 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ 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/>. */
+
+#ifndef STRING_OPTHR_H
+#define STRING_OPTHR_H 1
+
+/* Threshold value for when to enter the unrolled loops. */
+#define OP_T_THRES 16
+
+#endif /* string-opthr.h */
@@ -19,9 +19,6 @@
#include <sysdeps/generic/memcopy.h>
-#undef OP_T_THRES
-#define OP_T_THRES 8
-
#undef BYTE_COPY_FWD
#define BYTE_COPY_FWD(dst_bp, src_bp, nbytes) \
do { \
new file mode 100644
@@ -0,0 +1,25 @@
+/* string-opthr.h -- Define a threshold for word access. i386 version.
+ Copyright (C) 2016 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ 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/>. */
+
+#ifndef I386_STRING_OPTHR_H
+#define I386_STRING_OPTHR_H 1
+
+/* Threshold value for when to enter the unrolled loops. */
+#define OP_T_THRES 8
+
+#endif /* I386_STRING_OPTHR_H */
@@ -21,9 +21,6 @@
#if defined(__mc68020__) || defined(mc68020)
-#undef OP_T_THRES
-#define OP_T_THRES 16
-
/* WORD_COPY_FWD and WORD_COPY_BWD are not symmetric on the 68020,
because of its weird instruction overlap characteristics. */
@@ -51,11 +51,6 @@
[I fail to understand. I feel stupid. --roland]
*/
-
-/* Threshold value for when to enter the unrolled loops. */
-#undef OP_T_THRES
-#define OP_T_THRES 16
-
/* Copy exactly NBYTES bytes from SRC_BP to DST_BP,
without any assumptions about alignment of the pointers. */
#undef BYTE_COPY_FWD