diff mbox

[3/3] PowerPC: Cleanup powerpc memmove

Message ID 53BC00E6.6050604@linux.vnet.ibm.com
State Committed
Headers show

Commit Message

Adhemerval Zanella Netto July 8, 2014, 2:32 p.m. UTC
Now that MEMCPY_OK_FOR_FWD_MEMMOVE should be define on memcopy.h there
is no need for specialized powerpc memmove implementation.  This patch
moves the define set to powerpc memcopy and cleanup its definition on
powerpc code.

--

	* sysdeps/powerpc/memmove.c: Remove file.
	* sysdeps/powerpc/powerpc32/power4/memcopy.h
	[MEMCPY_OK_FOR_FWD_MEMMOVE]: Define it to 1.
	* sysdeps/powerpc/powerpc32/power4/multiarch/memmove-power7.c
	[MEMCPY_OK_FOR_FWD_MEMMOVE]: Remove define.
	* sysdeps/powerpc/powerpc32/power4/multiarch/memmove-ppc.c:
	[MEMCPY_OK_FOR_FWD_MEMMOVE]: Likewise.
	* sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c: Include default
	string memmove instead of removed powerpc one.

---

Comments

Adhemerval Zanella Netto July 8, 2014, 2:35 p.m. UTC | #1
Forgot to add on title description that is has been committed.

On 08-07-2014 11:32, Adhemerval Zanella wrote:
> Now that MEMCPY_OK_FOR_FWD_MEMMOVE should be define on memcopy.h there
> is no need for specialized powerpc memmove implementation.  This patch
> moves the define set to powerpc memcopy and cleanup its definition on
> powerpc code.
>
> --
>
> 	* sysdeps/powerpc/memmove.c: Remove file.
> 	* sysdeps/powerpc/powerpc32/power4/memcopy.h
> 	[MEMCPY_OK_FOR_FWD_MEMMOVE]: Define it to 1.
> 	* sysdeps/powerpc/powerpc32/power4/multiarch/memmove-power7.c
> 	[MEMCPY_OK_FOR_FWD_MEMMOVE]: Remove define.
> 	* sysdeps/powerpc/powerpc32/power4/multiarch/memmove-ppc.c:
> 	[MEMCPY_OK_FOR_FWD_MEMMOVE]: Likewise.
> 	* sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c: Include default
> 	string memmove instead of removed powerpc one.
>
> ---
>
> diff --git a/sysdeps/powerpc/memmove.c b/sysdeps/powerpc/memmove.c
> deleted file mode 100644
> index 9c62ecb..0000000
> --- a/sysdeps/powerpc/memmove.c
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -/* Copy memory to memory until the specified number of bytes
> -   has been copied.  Overlap is handled correctly.
> -   Copyright (C) 1991-2014 Free Software Foundation, Inc.
> -   This file is part of the GNU C Library.
> -   Contributed by Torbjorn Granlund (tege@sics.se).
> -
> -   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; see the file COPYING.LIB.  If
> -   not, see <http://www.gnu.org/licenses/>.  */
> -
> -#define MEMCPY_OK_FOR_FWD_MEMMOVE 1
> -#include <string/memmove.c>
> diff --git a/sysdeps/powerpc/powerpc32/power4/memcopy.h b/sysdeps/powerpc/powerpc32/power4/memcopy.h
> index d3752dc..3431084 100644
> --- a/sysdeps/powerpc/powerpc32/power4/memcopy.h
> +++ b/sysdeps/powerpc/powerpc32/power4/memcopy.h
> @@ -110,3 +110,7 @@
>  	  ((byte *) dst_ep)[0] = __x;					      \
>  	}								      \
>      } while (0)
> +
> +/* The powerpc memcpy implementation is safe to use for memmove.  */
> +#undef MEMCPY_OK_FOR_FWD_MEMMOVE
> +#define MEMCPY_OK_FOR_FWD_MEMMOVE 1
> diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-power7.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-power7.c
> index 2861071..b14c3b1 100644
> --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-power7.c
> +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-power7.c
> @@ -27,5 +27,4 @@ extern __typeof (memmove) __memmove_power7;
>  #undef libc_hidden_builtin_def
>  #define libc_hidden_builtin_def(name)
>
> -#define MEMCPY_OK_FOR_FWD_MEMMOVE 1
>  #include <string/memmove.c>
> diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-ppc.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-ppc.c
> index e323a4d..d56b77a 100644
> --- a/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-ppc.c
> +++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-ppc.c
> @@ -30,5 +30,4 @@ extern __typeof (memmove) __memmove_ppc;
>    __hidden_ver1 (__memmove_ppc, __GI_memmove, __memmove_ppc);
>  #endif
>
> -#define MEMCPY_OK_FOR_FWD_MEMMOVE 1
>  #include <string/memmove.c>
> diff --git a/sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c
> index b39348f..ff78fe6 100644
> --- a/sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c
> +++ b/sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c
> @@ -25,4 +25,4 @@
>
>  extern __typeof (memmove) __memmove_ppc attribute_hidden;
>
> -#include <sysdeps/powerpc/memmove.c>
> +#include <string/memmove.c>
>
diff mbox

Patch

diff --git a/sysdeps/powerpc/memmove.c b/sysdeps/powerpc/memmove.c
deleted file mode 100644
index 9c62ecb..0000000
--- a/sysdeps/powerpc/memmove.c
+++ /dev/null
@@ -1,22 +0,0 @@ 
-/* Copy memory to memory until the specified number of bytes
-   has been copied.  Overlap is handled correctly.
-   Copyright (C) 1991-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Torbjorn Granlund (tege@sics.se).
-
-   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; see the file COPYING.LIB.  If
-   not, see <http://www.gnu.org/licenses/>.  */
-
-#define MEMCPY_OK_FOR_FWD_MEMMOVE 1
-#include <string/memmove.c>
diff --git a/sysdeps/powerpc/powerpc32/power4/memcopy.h b/sysdeps/powerpc/powerpc32/power4/memcopy.h
index d3752dc..3431084 100644
--- a/sysdeps/powerpc/powerpc32/power4/memcopy.h
+++ b/sysdeps/powerpc/powerpc32/power4/memcopy.h
@@ -110,3 +110,7 @@ 
 	  ((byte *) dst_ep)[0] = __x;					      \
 	}								      \
     } while (0)
+
+/* The powerpc memcpy implementation is safe to use for memmove.  */
+#undef MEMCPY_OK_FOR_FWD_MEMMOVE
+#define MEMCPY_OK_FOR_FWD_MEMMOVE 1
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-power7.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-power7.c
index 2861071..b14c3b1 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-power7.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-power7.c
@@ -27,5 +27,4 @@  extern __typeof (memmove) __memmove_power7;
 #undef libc_hidden_builtin_def
 #define libc_hidden_builtin_def(name)
 
-#define MEMCPY_OK_FOR_FWD_MEMMOVE 1
 #include <string/memmove.c>
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-ppc.c b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-ppc.c
index e323a4d..d56b77a 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-ppc.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/memmove-ppc.c
@@ -30,5 +30,4 @@  extern __typeof (memmove) __memmove_ppc;
   __hidden_ver1 (__memmove_ppc, __GI_memmove, __memmove_ppc);
 #endif
 
-#define MEMCPY_OK_FOR_FWD_MEMMOVE 1
 #include <string/memmove.c>
diff --git a/sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c b/sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c
index b39348f..ff78fe6 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/memmove-ppc64.c
@@ -25,4 +25,4 @@ 
 
 extern __typeof (memmove) __memmove_ppc attribute_hidden;
 
-#include <sysdeps/powerpc/memmove.c>
+#include <string/memmove.c>