c6d234
commit 64df73c2ea0e02f7794ba2f08540a74a9bb198db
c6d234
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
c6d234
Date:   Sat Jun 28 06:05:24 2014 +0530
c6d234
c6d234
    Fix Wundef warning for MEMCPY_OK_FOR_FWD_MEMMOVE
c6d234
    
c6d234
    Define MEMCPY_OK_FOR_FWD_MEMMOVE in memcopy.h and let arch-specific
c6d234
    implementations of that file override the value if necessary.  This
c6d234
    override is only useful for tile and moving this macro to memcopy.h
c6d234
    allows us to remove the tile-specific memmove.c.
c6d234
c6d234
Conflicts:
c6d234
	sysdeps/tile/tilegx/memmove.c
c6d234
c6d234
Due to copyright header change; file removed manually.
c6d234
c6d234
diff --git a/sysdeps/generic/memcopy.h b/sysdeps/generic/memcopy.h
c6d234
index 631214b85ab81d57..08892a4ea33f1ca7 100644
c6d234
--- a/sysdeps/generic/memcopy.h
c6d234
+++ b/sysdeps/generic/memcopy.h
c6d234
@@ -148,4 +148,6 @@ extern void _wordcopy_bwd_dest_aligned (long int, long int, size_t) __THROW;
c6d234
 /* Threshold value for when to enter the unrolled loops.  */
c6d234
 #define	OP_T_THRES	16
c6d234
 
c6d234
+#define MEMCPY_OK_FOR_FWD_MEMMOVE 0
c6d234
+
c6d234
 #endif /* memcopy.h */
c6d234
diff --git a/sysdeps/tile/memcopy.h b/sysdeps/tile/memcopy.h
c6d234
index 2bc3fce6864315b8..2876baa0e9f9ab31 100644
c6d234
--- a/sysdeps/tile/memcopy.h
c6d234
+++ b/sysdeps/tile/memcopy.h
c6d234
@@ -19,6 +19,12 @@
c6d234
 #include <sysdeps/generic/memcopy.h>
c6d234
 #include <bits/wordsize.h>
c6d234
 
c6d234
+/* The tilegx implementation of memcpy is safe to use for memmove.  */
c6d234
+#ifdef __tilegx__
c6d234
+# undef MEMCPY_OK_FOR_FWD_MEMMOVE
c6d234
+# define MEMCPY_OK_FOR_FWD_MEMMOVE 1
c6d234
+#endif
c6d234
+
c6d234
 /* Support more efficient copying on tilegx32, which supports
c6d234
    long long as a native 64-bit type.  */
c6d234
 #if defined (__tilegx__) && __WORDSIZE == 32
c6d234
diff --git a/sysdeps/tile/tilegx/memmove.c b/sysdeps/tile/tilegx/memmove.c
c6d234
deleted file mode 100644
c6d234
index 0cb0a81e5fd53639..0000000000000000
c6d234
--- a/sysdeps/tile/tilegx/memmove.c
c6d234
+++ /dev/null
c6d234
@@ -1,22 +0,0 @@
c6d234
-/* Copy memory to memory until the specified number of bytes
c6d234
-   has been copied.  Overlap is handled correctly.
c6d234
-   Copyright (C) 2012 Free Software Foundation, Inc.
c6d234
-   This file is part of the GNU C Library.
c6d234
-
c6d234
-   The GNU C Library is free software; you can redistribute it and/or
c6d234
-   modify it under the terms of the GNU Lesser General Public
c6d234
-   License as published by the Free Software Foundation; either
c6d234
-   version 2.1 of the License, or (at your option) any later version.
c6d234
-
c6d234
-   The GNU C Library is distributed in the hope that it will be useful,
c6d234
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
c6d234
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
c6d234
-   Lesser General Public License for more details.
c6d234
-
c6d234
-   You should have received a copy of the GNU Lesser General Public
c6d234
-   License along with the GNU C Library; if not, see
c6d234
-   <http://www.gnu.org/licenses/>.  */
c6d234
-
c6d234
-/* The tilegx implementation of memcpy is safe to use for memmove.  */
c6d234
-#define MEMCPY_OK_FOR_FWD_MEMMOVE 1
c6d234
-#include <string/memmove.c>