summaryrefslogtreecommitdiff
path: root/sysdeps/s390/s390-32/multiarch
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/s390/s390-32/multiarch')
-rw-r--r--sysdeps/s390/s390-32/multiarch/memchr.c2
-rw-r--r--sysdeps/s390/s390-32/multiarch/memcmp-s390.S5
-rw-r--r--sysdeps/s390/s390-32/multiarch/memcmp.c9
-rw-r--r--sysdeps/s390/s390-32/multiarch/memcpy-s390.S38
-rw-r--r--sysdeps/s390/s390-32/multiarch/memcpy.c7
-rw-r--r--sysdeps/s390/s390-32/multiarch/memset-s390.S5
-rw-r--r--sysdeps/s390/s390-32/multiarch/memset.c7
-rw-r--r--sysdeps/s390/s390-32/multiarch/strcmp.c2
-rw-r--r--sysdeps/s390/s390-32/multiarch/strcpy.c2
-rw-r--r--sysdeps/s390/s390-32/multiarch/strncpy.c2
10 files changed, 62 insertions, 17 deletions
diff --git a/sysdeps/s390/s390-32/multiarch/memchr.c b/sysdeps/s390/s390-32/multiarch/memchr.c
index 2281e43056..5e1610afa4 100644
--- a/sysdeps/s390/s390-32/multiarch/memchr.c
+++ b/sysdeps/s390/s390-32/multiarch/memchr.c
@@ -1,5 +1,5 @@
/* Multiple versions of memchr.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 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
diff --git a/sysdeps/s390/s390-32/multiarch/memcmp-s390.S b/sysdeps/s390/s390-32/multiarch/memcmp-s390.S
index e9ee6d2270..e53b508c98 100644
--- a/sysdeps/s390/s390-32/multiarch/memcmp-s390.S
+++ b/sysdeps/s390/s390-32/multiarch/memcmp-s390.S
@@ -1,5 +1,5 @@
/* CPU specific memcmp implementations. 32 bit S/390 version.
- Copyright (C) 2012-2016 Free Software Foundation, Inc.
+ Copyright (C) 2012-2018 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
@@ -101,4 +101,7 @@ END(__memcmp_z10)
.set memcmp,__memcmp_default
.weak bcmp
.set bcmp,__memcmp_default
+#elif defined SHARED && IS_IN (libc)
+.globl __GI_memcmp
+.set __GI_memcmp,__memcmp_default
#endif
diff --git a/sysdeps/s390/s390-32/multiarch/memcmp.c b/sysdeps/s390/s390-32/multiarch/memcmp.c
index 44f72dc8ca..1e6f31806e 100644
--- a/sysdeps/s390/s390-32/multiarch/memcmp.c
+++ b/sysdeps/s390/s390-32/multiarch/memcmp.c
@@ -1,5 +1,5 @@
/* Multiple versions of memcmp.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 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
@@ -17,8 +17,11 @@
<http://www.gnu.org/licenses/>. */
#if IS_IN (libc)
+# define memcmp __redirect_memcmp
+# include <string.h>
+# undef memcmp
# include <ifunc-resolve.h>
-s390_libc_ifunc (memcmp)
-__asm__(".weak bcmp ; bcmp = memcmp");
+s390_libc_ifunc (__redirect_memcmp, __memcmp, memcmp)
+weak_alias (memcmp, bcmp);
#endif
diff --git a/sysdeps/s390/s390-32/multiarch/memcpy-s390.S b/sysdeps/s390/s390-32/multiarch/memcpy-s390.S
index 4e30cdf6c6..aad13bd07c 100644
--- a/sysdeps/s390/s390-32/multiarch/memcpy-s390.S
+++ b/sysdeps/s390/s390-32/multiarch/memcpy-s390.S
@@ -1,5 +1,5 @@
/* CPU specific memcpy implementations. 32 bit S/390 version.
- Copyright (C) 2012-2016 Free Software Foundation, Inc.
+ Copyright (C) 2012-2018 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
@@ -29,14 +29,23 @@
#if defined SHARED && IS_IN (libc)
+ENTRY(____mempcpy_z196)
+ .machine "z196"
+ .machinemode "zarch_nohighgprs"
+ lr %r1,%r2 # Use as dest
+ la %r2,0(%r4,%r2) # Return dest + n
+ j .L_Z196_start
+END(____mempcpy_z196)
+
ENTRY(__memcpy_z196)
.machine "z196"
.machinemode "zarch_nohighgprs"
+ lr %r1,%r2 # r1: Use as dest ; r2: Return dest
+.L_Z196_start:
llgfr %r4,%r4
ltgr %r4,%r4
je .L_Z196_4
aghi %r4,-1
- lr %r1,%r2
srlg %r5,%r4,8
ltgr %r5,%r5
jne .L_Z196_5
@@ -60,13 +69,22 @@ ENTRY(__memcpy_z196)
mvc 0(1,%r1),0(%r3)
END(__memcpy_z196)
+ENTRY(____mempcpy_z10)
+ .machine "z10"
+ .machinemode "zarch_nohighgprs"
+ lr %r1,%r2 # Use as dest
+ la %r2,0(%r4,%r2) # Return dest + n
+ j .L_Z10_start
+END(____mempcpy_z10)
+
ENTRY(__memcpy_z10)
.machine "z10"
.machinemode "zarch_nohighgprs"
+ lr %r1,%r2 # r1: Use as dest ; r2: Return dest
+.L_Z10_start:
llgfr %r4,%r4
cgije %r4,0,.L_Z10_4
aghi %r4,-1
- lr %r1,%r2
srlg %r5,%r4,8
cgijlh %r5,0,.L_Z10_13
.L_Z10_3:
@@ -88,11 +106,23 @@ ENTRY(__memcpy_z10)
mvc 0(1,%r1),0(%r3)
END(__memcpy_z10)
+# define __mempcpy ____mempcpy_default
#endif /* SHARED && IS_IN (libc) */
+#define memcpy __memcpy_default
#include "../memcpy.S"
+#undef memcpy
-#if !defined SHARED || !IS_IN (libc)
+#if defined SHARED && IS_IN (libc)
+.globl __GI_memcpy
+.set __GI_memcpy,__memcpy_default
+.globl __GI_mempcpy
+.set __GI_mempcpy,____mempcpy_default
+.globl __GI___mempcpy
+.set __GI___mempcpy,____mempcpy_default
+#else
.globl memcpy
.set memcpy,__memcpy_default
+.weak mempcpy
+.set mempcpy,__mempcpy
#endif
diff --git a/sysdeps/s390/s390-32/multiarch/memcpy.c b/sysdeps/s390/s390-32/multiarch/memcpy.c
index 2a98aa0b82..c9577a854a 100644
--- a/sysdeps/s390/s390-32/multiarch/memcpy.c
+++ b/sysdeps/s390/s390-32/multiarch/memcpy.c
@@ -1,5 +1,5 @@
/* Multiple versions of memcpy.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 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
@@ -18,7 +18,10 @@
/* In the static lib memcpy is needed before the reloc is resolved. */
#if defined SHARED && IS_IN (libc)
+# define memcpy __redirect_memcpy
+# include <string.h>
+# undef memcpy
# include <ifunc-resolve.h>
-s390_libc_ifunc (memcpy)
+s390_libc_ifunc (__redirect_memcpy, __memcpy, memcpy)
#endif
diff --git a/sysdeps/s390/s390-32/multiarch/memset-s390.S b/sysdeps/s390/s390-32/multiarch/memset-s390.S
index 47277c13a6..b092073d6b 100644
--- a/sysdeps/s390/s390-32/multiarch/memset-s390.S
+++ b/sysdeps/s390/s390-32/multiarch/memset-s390.S
@@ -1,5 +1,5 @@
/* Set a block of memory to some byte value. 32 bit S/390 version.
- Copyright (C) 2012-2016 Free Software Foundation, Inc.
+ Copyright (C) 2012-2018 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
@@ -110,4 +110,7 @@ END(__memset_mvcle)
#if !IS_IN (libc)
.globl memset
.set memset,__memset_default
+#elif defined SHARED && IS_IN (libc)
+.globl __GI_memset
+.set __GI_memset,__memset_default
#endif
diff --git a/sysdeps/s390/s390-32/multiarch/memset.c b/sysdeps/s390/s390-32/multiarch/memset.c
index 89b8102f2a..760b3e9df2 100644
--- a/sysdeps/s390/s390-32/multiarch/memset.c
+++ b/sysdeps/s390/s390-32/multiarch/memset.c
@@ -1,5 +1,5 @@
/* Multiple versions of memset.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 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
@@ -17,7 +17,10 @@
<http://www.gnu.org/licenses/>. */
#if IS_IN (libc)
+# define memset __redirect_memset
+# include <string.h>
+# undef memset
# include <ifunc-resolve.h>
-s390_libc_ifunc (memset)
+s390_libc_ifunc (__redirect_memset, __memset, memset)
#endif
diff --git a/sysdeps/s390/s390-32/multiarch/strcmp.c b/sysdeps/s390/s390-32/multiarch/strcmp.c
index b7eebc017f..d06b0f3436 100644
--- a/sysdeps/s390/s390-32/multiarch/strcmp.c
+++ b/sysdeps/s390/s390-32/multiarch/strcmp.c
@@ -1,5 +1,5 @@
/* Multiple versions of strcmp.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 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
diff --git a/sysdeps/s390/s390-32/multiarch/strcpy.c b/sysdeps/s390/s390-32/multiarch/strcpy.c
index ae140d22b7..6a22e31a03 100644
--- a/sysdeps/s390/s390-32/multiarch/strcpy.c
+++ b/sysdeps/s390/s390-32/multiarch/strcpy.c
@@ -1,5 +1,5 @@
/* Multiple versions of strcpy.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 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
diff --git a/sysdeps/s390/s390-32/multiarch/strncpy.c b/sysdeps/s390/s390-32/multiarch/strncpy.c
index 28a2af72e4..57f9df18d1 100644
--- a/sysdeps/s390/s390-32/multiarch/strncpy.c
+++ b/sysdeps/s390/s390-32/multiarch/strncpy.c
@@ -1,5 +1,5 @@
/* Multiple versions of strncpy.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 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