diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-01-10 18:00:51 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-02-06 16:19:35 -0300 |
commit | d45890b28c8712dbbbb3a39da1eef952d4bf98d1 (patch) | |
tree | b75a8f9d9a0f395e851417b1f75e6d864648ce89 /sysdeps/generic | |
parent | d1a9b6d8e736db997b5e825df92031645db5d96c (diff) | |
download | glibc-d45890b28c8712dbbbb3a39da1eef952d4bf98d1.tar glibc-d45890b28c8712dbbbb3a39da1eef952d4bf98d1.tar.gz glibc-d45890b28c8712dbbbb3a39da1eef952d4bf98d1.tar.bz2 glibc-d45890b28c8712dbbbb3a39da1eef952d4bf98d1.zip |
Parameterize OP_T_THRES from memcopy.h
It moves OP_T_THRES out of memcopy.h to its own header and adjust
each architecture that redefines it.
Checked with a build and check with run-built-tests=no for all major
Linux ABIs.
Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/memcopy.h | 4 | ||||
-rw-r--r-- | sysdeps/generic/string-opthr.h | 25 |
2 files changed, 26 insertions, 3 deletions
diff --git a/sysdeps/generic/memcopy.h b/sysdeps/generic/memcopy.h index b5ffa4d114..e9b3f227b2 100644 --- a/sysdeps/generic/memcopy.h +++ b/sysdeps/generic/memcopy.h @@ -57,6 +57,7 @@ /* Type to use for aligned memory operations. */ #include <string-optype.h> +#include <string-opthr.h> #define OPSIZ (sizeof (op_t)) /* Type to use for unaligned operations. */ @@ -188,9 +189,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. */ diff --git a/sysdeps/generic/string-opthr.h b/sysdeps/generic/string-opthr.h new file mode 100644 index 0000000000..6f10a98edd --- /dev/null +++ b/sysdeps/generic/string-opthr.h @@ -0,0 +1,25 @@ +/* Define a threshold for word access. Generic version. + Copyright (C) 2023 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 */ |