diff options
author | Stefan Liebler <stli@linux.ibm.com> | 2018-12-18 13:57:05 +0100 |
---|---|---|
committer | Stefan Liebler <stli@linux.ibm.com> | 2018-12-18 13:57:05 +0100 |
commit | 07be392807ac78330da90f01408aa7e042a97a88 (patch) | |
tree | 61dbb46016a8c0699a234552b2bd4a6eaa063065 /sysdeps/s390/memset-z900.S | |
parent | 712a254a97ade7f48fb7a434339faa05c048ce1f (diff) | |
download | glibc-07be392807ac78330da90f01408aa7e042a97a88.tar.gz glibc-07be392807ac78330da90f01408aa7e042a97a88.tar.xz glibc-07be392807ac78330da90f01408aa7e042a97a88.zip |
S390: Implement bzero with memset.
This patch removes the bzero s390 implementation with mvcle and adds entry points for bzero in memset ifunc variants. Therefore an ifunc resolver is implemented for bzero, too. ChangeLog: * sysdeps/s390/s390-32/bzero.S: Delete file. * sysdeps/s390/s390-64/bzero.S: Likewise. * sysdeps/s390/Makefile (sysdep_routines): Add bzero. * sysdeps/s390/bzero.c: New file. * sysdeps/s390/memset-z900.S: Add bzero entry points. * sysdeps/s390/ifunc-memset.h: Add bzero function macros. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add bzero ifunc variants.
Diffstat (limited to 'sysdeps/s390/memset-z900.S')
-rw-r--r-- | sysdeps/s390/memset-z900.S | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/sysdeps/s390/memset-z900.S b/sysdeps/s390/memset-z900.S index eaf13402bd..bfc659ae0b 100644 --- a/sysdeps/s390/memset-z900.S +++ b/sysdeps/s390/memset-z900.S @@ -22,10 +22,14 @@ #include "asm-syntax.h" #include <ifunc-memset.h> -/* INPUT PARAMETERS +/* INPUT PARAMETERS - MEMSET %r2 = address of memory area %r3 = byte to fill memory with - %r4 = number of bytes to fill. */ + %r4 = number of bytes to fill. + + INPUT PARAMETERS - BZERO + %r2 = address of memory area + %r3 = number of bytes to fill. */ .text @@ -44,7 +48,14 @@ # define BRCTG brct # endif /* ! defined __s390x__ */ +ENTRY(BZERO_Z900_G5) + LGR %r4,%r3 + xr %r3,%r3 + j .L_Z900_G5_start +END(BZERO_Z900_G5) + ENTRY(MEMSET_Z900_G5) +.L_Z900_G5_start: #if defined __s390x__ .machine "z900" #else @@ -90,7 +101,16 @@ END(MEMSET_Z900_G5) #endif /* HAVE_MEMSET_Z900_G5 */ #if HAVE_MEMSET_Z10 +ENTRY(BZERO_Z10) + .machine "z10" + .machinemode "zarch_nohighgprs" + lgr %r4,%r3 + xr %r3,%r3 + j .L_Z10_start +END(BZERO_Z10) + ENTRY(MEMSET_Z10) +.L_Z10_start: .machine "z10" .machinemode "zarch_nohighgprs" # if !defined __s390x__ @@ -122,7 +142,16 @@ END(MEMSET_Z10) #endif /* HAVE_MEMSET_Z10 */ #if HAVE_MEMSET_Z196 +ENTRY(BZERO_Z196) + .machine "z196" + .machinemode "zarch_nohighgprs" + lgr %r4,%r3 + xr %r3,%r3 + j .L_Z196_start +END(BZERO_Z196) + ENTRY(MEMSET_Z196) +.L_Z196_start: .machine "z196" .machinemode "zarch_nohighgprs" # if !defined __s390x__ @@ -177,6 +206,10 @@ END(__memset_mvcle) /* If we don't use ifunc, define an alias for memset here. Otherwise see sysdeps/s390/memset.c. */ strong_alias (MEMSET_DEFAULT, memset) +/* Same for bzero. If ifunc is used, see + sysdeps/s390/bzero.c. */ +strong_alias (BZERO_DEFAULT, __bzero) +weak_alias (__bzero, bzero) #endif #if defined SHARED && IS_IN (libc) |