From 96fbb9a328232e42814334d6e29a9a9c7995c01d Mon Sep 17 00:00:00 2001 From: Stefan Liebler Date: Fri, 22 Mar 2019 11:14:08 +0100 Subject: 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. --- sysdeps/s390/multiarch/ifunc-resolve.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sysdeps/s390/multiarch/ifunc-resolve.h') diff --git a/sysdeps/s390/multiarch/ifunc-resolve.h b/sysdeps/s390/multiarch/ifunc-resolve.h index b833dfef28..743de9e591 100644 --- a/sysdeps/s390/multiarch/ifunc-resolve.h +++ b/sysdeps/s390/multiarch/ifunc-resolve.h @@ -22,6 +22,11 @@ #define S390_STFLE_BITS_Z10 34 /* General instructions extension */ #define S390_STFLE_BITS_Z196 45 /* Distinct operands, pop ... */ +#define S390_STFLE_BITS_ARCH13_MIE3 61 /* Miscellaneous-Instruction-Extensions + Facility 3, e.g. mvcrl. */ + +#define S390_IS_ARCH13_MIE3(STFLE_BITS) \ + ((STFLE_BITS & (1ULL << (63 - S390_STFLE_BITS_ARCH13_MIE3))) != 0) #define S390_IS_Z196(STFLE_BITS) \ ((STFLE_BITS & (1ULL << (63 - S390_STFLE_BITS_Z196))) != 0) -- cgit 1.4.1