diff options
author | Stefan Liebler <stli@linux.ibm.com> | 2019-03-22 11:14:08 +0100 |
---|---|---|
committer | Stefan Liebler <stli@linux.ibm.com> | 2019-03-22 11:14:08 +0100 |
commit | 96fbb9a328232e42814334d6e29a9a9c7995c01d (patch) | |
tree | 3df42c7279ddb720eb4b57cd5f685619d8bad08d /sysdeps/s390/ifunc-memcpy.h | |
parent | a899a5512f618d5c4093a2d65e8dee07c791b0ab (diff) | |
download | glibc-96fbb9a328232e42814334d6e29a9a9c7995c01d.tar glibc-96fbb9a328232e42814334d6e29a9a9c7995c01d.tar.gz glibc-96fbb9a328232e42814334d6e29a9a9c7995c01d.tar.bz2 glibc-96fbb9a328232e42814334d6e29a9a9c7995c01d.zip |
S390: Add arch13 memmove ifunc variant.
This patch introduces the new arch13 ifunc variant for memmove.
For the forward or non-overlapping case it is just using memcpy.
For the backward case it relies on the new instruction mvcrl.
The instruction copies up to 256 bytes at once.
In case of an overlap, it copies the bytes like copying them
one by one starting from right to left.
ChangeLog:
* sysdeps/s390/ifunc-memcpy.h (HAVE_MEMMOVE_ARCH13, MEMMOVE_ARCH13
HAVE_MEMMOVE_IFUNC_AND_ARCH13_SUPPORT): New defines.
* sysdeps/s390/memcpy-z900.S: Add arch13 memmove implementation.
* sysdeps/s390/memmove.c (memmove): Add arch13 variant in
ifunc selector.
* sysdeps/s390/multiarch/ifunc-impl-list.c
(__libc_ifunc_impl_list): Add ifunc variant for arch13 memmove.
* sysdeps/s390/multiarch/ifunc-resolve.h (S390_STFLE_BITS_ARCH13_MIE3,
S390_IS_ARCH13_MIE3): New defines.
Diffstat (limited to 'sysdeps/s390/ifunc-memcpy.h')
-rw-r--r-- | sysdeps/s390/ifunc-memcpy.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/sysdeps/s390/ifunc-memcpy.h b/sysdeps/s390/ifunc-memcpy.h index b83ae73508..1badb30ed8 100644 --- a/sysdeps/s390/ifunc-memcpy.h +++ b/sysdeps/s390/ifunc-memcpy.h @@ -44,7 +44,7 @@ #endif #if defined SHARED && defined USE_MULTIARCH && IS_IN (libc) \ - && ! defined HAVE_S390_MIN_Z13_ZARCH_ASM_SUPPORT + && ! defined HAVE_S390_MIN_ARCH13_ZARCH_ASM_SUPPORT # define HAVE_MEMMOVE_IFUNC 1 #else # define HAVE_MEMMOVE_IFUNC 0 @@ -56,14 +56,27 @@ # define HAVE_MEMMOVE_IFUNC_AND_VX_SUPPORT 0 #endif -#if defined HAVE_S390_MIN_Z13_ZARCH_ASM_SUPPORT +#ifdef HAVE_S390_ARCH13_ASM_SUPPORT +# define HAVE_MEMMOVE_IFUNC_AND_ARCH13_SUPPORT HAVE_MEMMOVE_IFUNC +#else +# define HAVE_MEMMOVE_IFUNC_AND_ARCH13_SUPPORT 0 +#endif + +#if defined HAVE_S390_MIN_ARCH13_ZARCH_ASM_SUPPORT +# define MEMMOVE_DEFAULT MEMMOVE_ARCH13 +# define HAVE_MEMMOVE_C 0 +# define HAVE_MEMMOVE_Z13 0 +# define HAVE_MEMMOVE_ARCH13 1 +#elif defined HAVE_S390_MIN_Z13_ZARCH_ASM_SUPPORT # define MEMMOVE_DEFAULT MEMMOVE_Z13 # define HAVE_MEMMOVE_C 0 # define HAVE_MEMMOVE_Z13 1 +# define HAVE_MEMMOVE_ARCH13 HAVE_MEMMOVE_IFUNC_AND_ARCH13_SUPPORT #else # define MEMMOVE_DEFAULT MEMMOVE_C # define HAVE_MEMMOVE_C 1 # define HAVE_MEMMOVE_Z13 HAVE_MEMMOVE_IFUNC_AND_VX_SUPPORT +# define HAVE_MEMMOVE_ARCH13 HAVE_MEMMOVE_IFUNC_AND_ARCH13_SUPPORT #endif #if HAVE_MEMCPY_Z900_G5 @@ -101,3 +114,9 @@ #else # define MEMMOVE_Z13 NULL #endif + +#if HAVE_MEMMOVE_ARCH13 +# define MEMMOVE_ARCH13 __memmove_arch13 +#else +# define MEMMOVE_ARCH13 NULL +#endif |