summaryrefslogtreecommitdiff
path: root/sysdeps/i386/i586
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-10-09 19:21:56 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-10-09 19:21:56 +0200
commit525c181a5a9a95e24d2111b7792608151a40eb84 (patch)
tree8ba16eeb3fb7327e5c3c5bba9c5786d4bb6ccec1 /sysdeps/i386/i586
parent4dd9e35bfd35d3138bc44169baba098005bad51e (diff)
parent7bb5f8a836b916d6ebf7b6921b136e99cea2442d (diff)
Merge commit 'refs/top-bases/t/bigmem' into t/bigmem
Diffstat (limited to 'sysdeps/i386/i586')
-rw-r--r--sysdeps/i386/i586/Implies2
-rw-r--r--sysdeps/i386/i586/add_n.S2
-rw-r--r--sysdeps/i386/i586/addmul_1.S2
-rw-r--r--sysdeps/i386/i586/bzero.S1
-rw-r--r--sysdeps/i386/i586/init-arch.h19
-rw-r--r--sysdeps/i386/i586/lshift.S2
-rw-r--r--sysdeps/i386/i586/memcopy.h2
-rw-r--r--sysdeps/i386/i586/memcpy.S13
-rw-r--r--sysdeps/i386/i586/memcpy_chk.S1
-rw-r--r--sysdeps/i386/i586/mempcpy.S1
-rw-r--r--sysdeps/i386/i586/mempcpy_chk.S1
-rw-r--r--sysdeps/i386/i586/memset.S24
-rw-r--r--sysdeps/i386/i586/memset_chk.S1
-rw-r--r--sysdeps/i386/i586/mul_1.S2
-rw-r--r--sysdeps/i386/i586/pthread_spin_trylock.S1
-rw-r--r--sysdeps/i386/i586/rshift.S2
-rw-r--r--sysdeps/i386/i586/strchr.S2
-rw-r--r--sysdeps/i386/i586/strcpy.S2
-rw-r--r--sysdeps/i386/i586/strlen.S2
-rw-r--r--sysdeps/i386/i586/sub_n.S2
-rw-r--r--sysdeps/i386/i586/submul_1.S2
21 files changed, 48 insertions, 38 deletions
diff --git a/sysdeps/i386/i586/Implies b/sysdeps/i386/i586/Implies
deleted file mode 100644
index 477cd741ce..0000000000
--- a/sysdeps/i386/i586/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-# Code optimized for i486 is better than simple i386 code.
-i386/i486
diff --git a/sysdeps/i386/i586/add_n.S b/sysdeps/i386/i586/add_n.S
index b28a39639a..22e9c41f5c 100644
--- a/sysdeps/i386/i586/add_n.S
+++ b/sysdeps/i386/i586/add_n.S
@@ -1,6 +1,6 @@
/* Pentium __mpn_add_n -- Add two limb vectors of the same length > 0 and store
sum in a third limb vector.
- Copyright (C) 1992-2015 Free Software Foundation, Inc.
+ Copyright (C) 1992-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
diff --git a/sysdeps/i386/i586/addmul_1.S b/sysdeps/i386/i586/addmul_1.S
index f1fa2f359f..9ab4d7d94b 100644
--- a/sysdeps/i386/i586/addmul_1.S
+++ b/sysdeps/i386/i586/addmul_1.S
@@ -1,6 +1,6 @@
/* Pentium __mpn_addmul_1 -- Multiply a limb vector with a limb and add
the result to a second limb vector.
- Copyright (C) 1992-2015 Free Software Foundation, Inc.
+ Copyright (C) 1992-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
diff --git a/sysdeps/i386/i586/bzero.S b/sysdeps/i386/i586/bzero.S
index 84d2f709c1..2a106719a4 100644
--- a/sysdeps/i386/i586/bzero.S
+++ b/sysdeps/i386/i586/bzero.S
@@ -1,3 +1,4 @@
+#define USE_AS_BZERO
#define memset __bzero
#include <sysdeps/i386/i586/memset.S>
weak_alias (__bzero, bzero)
diff --git a/sysdeps/i386/i586/init-arch.h b/sysdeps/i386/i586/init-arch.h
new file mode 100644
index 0000000000..756c0d7895
--- /dev/null
+++ b/sysdeps/i386/i586/init-arch.h
@@ -0,0 +1,19 @@
+/* Copyright (C) 2015-2016 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/>. */
+
+#define MINIMUM_ISA 586
+#include <sysdeps/x86/init-arch.h>
diff --git a/sysdeps/i386/i586/lshift.S b/sysdeps/i386/i586/lshift.S
index 4aa0de936e..66d9233d8a 100644
--- a/sysdeps/i386/i586/lshift.S
+++ b/sysdeps/i386/i586/lshift.S
@@ -1,5 +1,5 @@
/* Pentium optimized __mpn_lshift --
- Copyright (C) 1992-2015 Free Software Foundation, Inc.
+ Copyright (C) 1992-2016 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/i386/i586/memcopy.h b/sysdeps/i386/i586/memcopy.h
index 52e19d861b..78f628b89e 100644
--- a/sysdeps/i386/i586/memcopy.h
+++ b/sysdeps/i386/i586/memcopy.h
@@ -1,5 +1,5 @@
/* memcopy.h -- definitions for memory copy functions. Pentium version.
- Copyright (C) 1994-2015 Free Software Foundation, Inc.
+ Copyright (C) 1994-2016 Free Software Foundation, Inc.
Contributed by Torbjorn Granlund (tege@sics.se).
This file is part of the GNU C Library.
diff --git a/sysdeps/i386/i586/memcpy.S b/sysdeps/i386/i586/memcpy.S
index 97973658b6..25cf98da09 100644
--- a/sysdeps/i386/i586/memcpy.S
+++ b/sysdeps/i386/i586/memcpy.S
@@ -1,5 +1,5 @@
/* Highly optimized version for i586.
- Copyright (C) 1997-2015 Free Software Foundation, Inc.
+ Copyright (C) 1997-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,11 +20,6 @@
#include <sysdep.h>
#include "asm-syntax.h"
-/* BEWARE: `#ifdef memcpy' means that memcpy is redefined as `mempcpy',
- and the return value is the byte after the last one copied in
- the destination. */
-#define MEMPCPY_P (defined memcpy)
-
#define PARMS 4+8 /* space for 2 saved regs */
#define RTN PARMS
#define DEST RTN
@@ -105,13 +100,13 @@ L(3): movl 28(%edi), %edx
/* Correct extra loop counter modification. */
L(2): addl $32, %ecx
-#if !MEMPCPY_P
+#ifndef USE_AS_MEMPCPY
movl DEST(%esp), %eax
#endif
L(1): rep; movsb
-#if MEMPCPY_P
+#ifdef USE_AS_MEMPCPY
movl %edi, %eax
#endif
@@ -124,6 +119,6 @@ L(1): rep; movsb
ret
END (memcpy)
-#if !MEMPCPY_P
+#ifndef USE_AS_MEMPCPY
libc_hidden_builtin_def (memcpy)
#endif
diff --git a/sysdeps/i386/i586/memcpy_chk.S b/sysdeps/i386/i586/memcpy_chk.S
deleted file mode 100644
index ab8a95c9b4..0000000000
--- a/sysdeps/i386/i586/memcpy_chk.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/i386/i686/memcpy_chk.S>
diff --git a/sysdeps/i386/i586/mempcpy.S b/sysdeps/i386/i586/mempcpy.S
index afc112d9d7..720a4c0923 100644
--- a/sysdeps/i386/i586/mempcpy.S
+++ b/sysdeps/i386/i586/mempcpy.S
@@ -1,3 +1,4 @@
+#define USE_AS_MEMPCPY
#define memcpy __mempcpy
#define __memcpy_chk __mempcpy_chk
#include <sysdeps/i386/i586/memcpy.S>
diff --git a/sysdeps/i386/i586/mempcpy_chk.S b/sysdeps/i386/i586/mempcpy_chk.S
deleted file mode 100644
index 9a1de1dfe3..0000000000
--- a/sysdeps/i386/i586/mempcpy_chk.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/i386/i686/mempcpy_chk.S>
diff --git a/sysdeps/i386/i586/memset.S b/sysdeps/i386/i586/memset.S
index bc26501d10..3590ad1183 100644
--- a/sysdeps/i386/i586/memset.S
+++ b/sysdeps/i386/i586/memset.S
@@ -1,6 +1,6 @@
/* memset/bzero -- set memory area to CH/0
Highly optimized version for ix86, x>=5.
- Copyright (C) 1996-2015 Free Software Foundation, Inc.
+ Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Torbjorn Granlund, <tege@matematik.su.se>
@@ -21,13 +21,10 @@
#include <sysdep.h>
#include "asm-syntax.h"
-/* BEWARE: `#ifdef memset' means that memset is redefined as `bzero' */
-#define BZERO_P (defined memset)
-
#define PARMS 4+4 /* space for 1 saved reg */
#define RTN PARMS
#define DEST RTN
-#if BZERO_P
+#ifdef USE_AS_BZERO
# define LEN DEST+4
#else
# define CHR DEST+4
@@ -35,7 +32,7 @@
#endif
.text
-#if defined PIC && IS_IN (libc) && !BZERO_P
+#if defined SHARED && IS_IN (libc) && !defined USE_AS_BZERO
ENTRY (__memset_chk)
movl 12(%esp), %eax
cmpl %eax, 16(%esp)
@@ -50,7 +47,7 @@ ENTRY (memset)
movl DEST(%esp), %edi
cfi_rel_offset (edi, 0)
movl LEN(%esp), %edx
-#if BZERO_P
+#ifdef USE_AS_BZERO
xorl %eax, %eax /* we fill with 0 */
#else
movb CHR(%esp), %al
@@ -104,7 +101,7 @@ L(2): shrl $2, %ecx /* convert byte count to longword count */
rep
stosb
-#if !BZERO_P
+#ifndef USE_AS_BZERO
/* Load result (only if used as memset). */
movl DEST(%esp), %eax /* start address of destination is result */
#endif
@@ -112,10 +109,13 @@ L(2): shrl $2, %ecx /* convert byte count to longword count */
cfi_adjust_cfa_offset (-4)
cfi_restore (edi)
-#if BZERO_P
- ret
-#else
ret
-#endif
END (memset)
libc_hidden_builtin_def (memset)
+
+#if defined SHARED && IS_IN (libc) && !defined __memset_chk \
+ && !defined USE_AS_BZERO
+strong_alias (__memset_chk, __memset_zero_constant_len_parameter)
+ .section .gnu.warning.__memset_zero_constant_len_parameter
+ .string "memset used with constant zero length parameter; this could be due to transposed parameters"
+#endif
diff --git a/sysdeps/i386/i586/memset_chk.S b/sysdeps/i386/i586/memset_chk.S
deleted file mode 100644
index 09f9d42e0d..0000000000
--- a/sysdeps/i386/i586/memset_chk.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/i386/i686/memset_chk.S>
diff --git a/sysdeps/i386/i586/mul_1.S b/sysdeps/i386/i586/mul_1.S
index 1e2eafab0a..b7958b5e7e 100644
--- a/sysdeps/i386/i586/mul_1.S
+++ b/sysdeps/i386/i586/mul_1.S
@@ -1,6 +1,6 @@
/* Pentium __mpn_mul_1 -- Multiply a limb vector with a limb and store
the result in a second limb vector.
- Copyright (C) 1992-2015 Free Software Foundation, Inc.
+ Copyright (C) 1992-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
diff --git a/sysdeps/i386/i586/pthread_spin_trylock.S b/sysdeps/i386/i586/pthread_spin_trylock.S
deleted file mode 100644
index 0cf8b3ab70..0000000000
--- a/sysdeps/i386/i586/pthread_spin_trylock.S
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/i386/i486/pthread_spin_trylock.S>
diff --git a/sysdeps/i386/i586/rshift.S b/sysdeps/i386/i586/rshift.S
index 4037013952..3bb9b49c80 100644
--- a/sysdeps/i386/i586/rshift.S
+++ b/sysdeps/i386/i586/rshift.S
@@ -1,5 +1,5 @@
/* Pentium optimized __mpn_rshift --
- Copyright (C) 1992-2015 Free Software Foundation, Inc.
+ Copyright (C) 1992-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
diff --git a/sysdeps/i386/i586/strchr.S b/sysdeps/i386/i586/strchr.S
index b6564dd955..497e32133d 100644
--- a/sysdeps/i386/i586/strchr.S
+++ b/sysdeps/i386/i586/strchr.S
@@ -1,6 +1,6 @@
/* Find character CH in a NUL terminated string.
Highly optimized version for ix85, x>=5.
- Copyright (C) 1995-2015 Free Software Foundation, Inc.
+ Copyright (C) 1995-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
diff --git a/sysdeps/i386/i586/strcpy.S b/sysdeps/i386/i586/strcpy.S
index 848b8ae322..93ff5ac74d 100644
--- a/sysdeps/i386/i586/strcpy.S
+++ b/sysdeps/i386/i586/strcpy.S
@@ -1,5 +1,5 @@
/* strcpy/stpcpy implementation for i586.
- Copyright (C) 1997-2015 Free Software Foundation, Inc.
+ Copyright (C) 1997-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
diff --git a/sysdeps/i386/i586/strlen.S b/sysdeps/i386/i586/strlen.S
index b718120e20..707b6888f9 100644
--- a/sysdeps/i386/i586/strlen.S
+++ b/sysdeps/i386/i586/strlen.S
@@ -1,6 +1,6 @@
/* strlen -- Compute length of NUL terminated string.
Highly optimized version for ix86, x>=5.
- Copyright (C) 1995-2015 Free Software Foundation, Inc.
+ Copyright (C) 1995-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
diff --git a/sysdeps/i386/i586/sub_n.S b/sysdeps/i386/i586/sub_n.S
index e7dbb1c373..671abca018 100644
--- a/sysdeps/i386/i586/sub_n.S
+++ b/sysdeps/i386/i586/sub_n.S
@@ -1,6 +1,6 @@
/* Pentium __mpn_sub_n -- Subtract two limb vectors of the same length > 0
and store difference in a third limb vector.
- Copyright (C) 1992-2015 Free Software Foundation, Inc.
+ Copyright (C) 1992-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify
diff --git a/sysdeps/i386/i586/submul_1.S b/sysdeps/i386/i586/submul_1.S
index d8cbefdaa3..cf9208b3d8 100644
--- a/sysdeps/i386/i586/submul_1.S
+++ b/sysdeps/i386/i586/submul_1.S
@@ -1,6 +1,6 @@
/* Pentium __mpn_submul_1 -- Multiply a limb vector with a limb and subtract
the result from a second limb vector.
- Copyright (C) 1992-2015 Free Software Foundation, Inc.
+ Copyright (C) 1992-2016 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
The GNU MP Library is free software; you can redistribute it and/or modify