From: Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
To: libc-alpha@sourceware.org
Subject: [PATCH 1/9] powerpc: refactor stpcpy, stpncpy, strcpy, and strncpy IFUNC.
Date: Mon, 03 Apr 2017 21:19:00 -0000 [thread overview]
Message-ID: <ab767062e11986feeb6c2608afd8c7c51c0e79a5.1491252969.git.wainersm@linux.vnet.ibm.com> (raw)
In-Reply-To: <cover.1491252969.git.wainersm@linux.vnet.ibm.com>
In-Reply-To: <cover.1491252969.git.wainersm@linux.vnet.ibm.com>
2017-04-03 Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
* sysdeps/powerpc/powerpc64/multiarch/stpcpy-power8.S: Define the
implementation-specific function name and remove unneeded macros definition.
* sysdeps/powerpc/powerpc64/multiarch/stpncpy-power7.S: Likewise.
* sysdeps/powerpc/powerpc64/multiarch/stpncpy-power8.S: Likewise.
* sysdeps/powerpc/powerpc64/multiarch/strcpy-power8.S: Likewise.
* sysdeps/powerpc/powerpc64/multiarch/strncpy-power7.S: Likewise.
* sysdeps/powerpc/powerpc64/multiarch/strncpy-power8.S: Likewise.
* sysdeps/powerpc/powerpc64/power7/strncpy.S: Set a default
function name if not defined.
* sysdeps/powerpc/powerpc64/power8/strcpy.S: Likewise.
* sysdeps/powerpc/powerpc64/power8/strncpy.S: Likewise.
---
sysdeps/powerpc/powerpc64/multiarch/stpcpy-power8.S | 16 +---------------
sysdeps/powerpc/powerpc64/multiarch/stpncpy-power7.S | 16 +---------------
sysdeps/powerpc/powerpc64/multiarch/stpncpy-power8.S | 16 +---------------
sysdeps/powerpc/powerpc64/multiarch/strcpy-power8.S | 16 +---------------
sysdeps/powerpc/powerpc64/multiarch/strncpy-power7.S | 16 +---------------
sysdeps/powerpc/powerpc64/multiarch/strncpy-power8.S | 16 +---------------
sysdeps/powerpc/powerpc64/power7/strncpy.S | 14 +++++++++++---
sysdeps/powerpc/powerpc64/power8/strcpy.S | 14 +++++++++++---
sysdeps/powerpc/powerpc64/power8/strncpy.S | 14 +++++++++++---
9 files changed, 39 insertions(+), 99 deletions(-)
diff --git a/sysdeps/powerpc/powerpc64/multiarch/stpcpy-power8.S b/sysdeps/powerpc/powerpc64/multiarch/stpcpy-power8.S
index a614b5b..9353471 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/stpcpy-power8.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/stpcpy-power8.S
@@ -18,21 +18,7 @@
#include <sysdep.h>
-#undef EALIGN
-#define EALIGN(name, alignt, words) \
- .section ".text"; \
- ENTRY_2(__stpcpy_power8) \
- .align ALIGNARG(alignt); \
- EALIGN_W_##words; \
- BODY_LABEL(__stpcpy_power8): \
- cfi_startproc; \
- LOCALENTRY(__stpcpy_power8)
-
-#undef END
-#define END(name) \
- cfi_endproc; \
- TRACEBACK(__stpcpy_power8) \
- END_2(__stpcpy_power8)
+#define STPCPY __stpcpy_power8
#undef libc_hidden_builtin_def
#define libc_hidden_builtin_def(name)
diff --git a/sysdeps/powerpc/powerpc64/multiarch/stpncpy-power7.S b/sysdeps/powerpc/powerpc64/multiarch/stpncpy-power7.S
index 6c88da3..6636b01 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/stpncpy-power7.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/stpncpy-power7.S
@@ -20,21 +20,7 @@
#define USE_AS_STPNCPY
-#undef EALIGN
-#define EALIGN(name, alignt, words) \
- .section ".text"; \
- ENTRY_2(__stpncpy_power7) \
- .align ALIGNARG(alignt); \
- EALIGN_W_##words; \
- BODY_LABEL(__stpncpy_power7): \
- cfi_startproc; \
- LOCALENTRY(__stpncpy_power7)
-
-#undef END
-#define END(name) \
- cfi_endproc; \
- TRACEBACK(__stpncpy_power7) \
- END_2(__stpncpy_power7)
+#define STPNCPY __stpncpy_power7
#undef libc_hidden_builtin_def
#define libc_hidden_builtin_def(name)
diff --git a/sysdeps/powerpc/powerpc64/multiarch/stpncpy-power8.S b/sysdeps/powerpc/powerpc64/multiarch/stpncpy-power8.S
index ff6d3dd..6ce706a 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/stpncpy-power8.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/stpncpy-power8.S
@@ -20,21 +20,7 @@
#define USE_AS_STPNCPY
-#undef EALIGN
-#define EALIGN(name, alignt, words) \
- .section ".text"; \
- ENTRY_2(__stpncpy_power8) \
- .align ALIGNARG(alignt); \
- EALIGN_W_##words; \
- BODY_LABEL(__stpncpy_power8): \
- cfi_startproc; \
- LOCALENTRY(__stpncpy_power8)
-
-#undef END
-#define END(name) \
- cfi_endproc; \
- TRACEBACK(__stpncpy_power8) \
- END_2(__stpncpy_power8)
+#define STPNCPY __stpncpy_power8
#undef libc_hidden_builtin_def
#define libc_hidden_builtin_def(name)
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcpy-power8.S b/sysdeps/powerpc/powerpc64/multiarch/strcpy-power8.S
index 576d260..6c753b5 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strcpy-power8.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/strcpy-power8.S
@@ -18,21 +18,7 @@
#include <sysdep.h>
-#undef EALIGN
-#define EALIGN(name, alignt, words) \
- .section ".text"; \
- ENTRY_2(__strcpy_power8) \
- .align ALIGNARG(alignt); \
- EALIGN_W_##words; \
- BODY_LABEL(__strcpy_power8): \
- cfi_startproc; \
- LOCALENTRY(__strcpy_power8)
-
-#undef END
-#define END(name) \
- cfi_endproc; \
- TRACEBACK(__strcpy_power8) \
- END_2(__strcpy_power8)
+#define STRCPY __strcpy_power8
#undef libc_hidden_builtin_def
#define libc_hidden_builtin_def(name)
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncpy-power7.S b/sysdeps/powerpc/powerpc64/multiarch/strncpy-power7.S
index 5387e49..03f7f83 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strncpy-power7.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncpy-power7.S
@@ -18,21 +18,7 @@
#include <sysdep.h>
-#undef EALIGN
-#define EALIGN(name, alignt, words) \
- .section ".text"; \
- ENTRY_2(__strncpy_power7) \
- .align ALIGNARG(alignt); \
- EALIGN_W_##words; \
- BODY_LABEL(__strncpy_power7): \
- cfi_startproc; \
- LOCALENTRY(__strncpy_power7)
-
-#undef END
-#define END(name) \
- cfi_endproc; \
- TRACEBACK(__strncpy_power7) \
- END_2(__strncpy_power7)
+#define STRNCPY __strncpy_power7
#undef libc_hidden_builtin_def
#define libc_hidden_builtin_def(name)
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strncpy-power8.S b/sysdeps/powerpc/powerpc64/multiarch/strncpy-power8.S
index 37902cf..17117eb 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strncpy-power8.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/strncpy-power8.S
@@ -18,21 +18,7 @@
#include <sysdep.h>
-#undef EALIGN
-#define EALIGN(name, alignt, words) \
- .section ".text"; \
- ENTRY_2(__strncpy_power8) \
- .align ALIGNARG(alignt); \
- EALIGN_W_##words; \
- BODY_LABEL(__strncpy_power8): \
- cfi_startproc; \
- LOCALENTRY(__strncpy_power8)
-
-#undef END
-#define END(name) \
- cfi_endproc; \
- TRACEBACK(__strncpy_power8) \
- END_2(__strncpy_power8)
+#define STRNCPY __strncpy_power8
#undef libc_hidden_builtin_def
#define libc_hidden_builtin_def(name)
diff --git a/sysdeps/powerpc/powerpc64/power7/strncpy.S b/sysdeps/powerpc/powerpc64/power7/strncpy.S
index 98aabda..0224f74 100644
--- a/sysdeps/powerpc/powerpc64/power7/strncpy.S
+++ b/sysdeps/powerpc/powerpc64/power7/strncpy.S
@@ -40,10 +40,18 @@
memset. */
#ifdef USE_AS_STPNCPY
-# define FUNC_NAME __stpncpy
+# ifndef STPNCPY
+# define FUNC_NAME __stpncpy
+# else
+# define FUNC_NAME STPNCPY
+# endif
#else
-# define FUNC_NAME strncpy
-#endif
+# ifndef STRNCPY
+# define FUNC_NAME strncpy
+# else
+# define FUNC_NAME STRNCPY
+# endif
+#endif /* !USE_AS_STPNCPY */
#define FRAMESIZE (FRAME_MIN_SIZE+32)
diff --git a/sysdeps/powerpc/powerpc64/power8/strcpy.S b/sysdeps/powerpc/powerpc64/power8/strcpy.S
index 27440cd..7f2cee4 100644
--- a/sysdeps/powerpc/powerpc64/power8/strcpy.S
+++ b/sysdeps/powerpc/powerpc64/power8/strcpy.S
@@ -19,10 +19,18 @@
#include <sysdep.h>
#ifdef USE_AS_STPCPY
-# define FUNC_NAME __stpcpy
+# ifndef STPCPY
+# define FUNC_NAME __stpcpy
+# else
+# define FUNC_NAME STPCPY
+# endif
#else
-# define FUNC_NAME strcpy
-#endif
+# ifndef STRCPY
+# define FUNC_NAME strcpy
+# else
+# define FUNC_NAME STRCPY
+# endif
+#endif /* !USE_AS_STPCPY */
/* Implements the function
diff --git a/sysdeps/powerpc/powerpc64/power8/strncpy.S b/sysdeps/powerpc/powerpc64/power8/strncpy.S
index 622a55d..6d40f30 100644
--- a/sysdeps/powerpc/powerpc64/power8/strncpy.S
+++ b/sysdeps/powerpc/powerpc64/power8/strncpy.S
@@ -19,10 +19,18 @@
#include <sysdep.h>
#ifdef USE_AS_STPNCPY
-# define FUNC_NAME __stpncpy
+# ifndef STPNCPY
+# define FUNC_NAME __stpncpy
+# else
+# define FUNC_NAME STPNCPY
+# endif
#else
-# define FUNC_NAME strncpy
-#endif
+# ifndef STRNCPY
+# define FUNC_NAME strncpy
+# else
+# define FUNC_NAME STRNCPY
+# endif
+#endif /* !USE_AS_STPNCPY */
#ifndef MEMSET
/* For builds without IFUNC support, local calls should be made to internal
--
1.9.1
next prev parent reply other threads:[~2017-04-03 21:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-03 21:19 [PATCH 0/9] powerpc: cleanup IFUNC implementations Wainer dos Santos Moschetta
2017-04-03 21:19 ` [PATCH 2/9] powerpc: refactor strcasecmp, strcmp, and strncmp IFUNC Wainer dos Santos Moschetta
2017-04-03 21:19 ` [PATCH 3/9] powerpc: refactor strnlen and strlen IFUNC Wainer dos Santos Moschetta
2017-04-03 21:19 ` Wainer dos Santos Moschetta [this message]
2017-04-03 21:19 ` [PATCH 4/9] powerpc: refactor strchr, strchrnul, and strrchr IFUNC Wainer dos Santos Moschetta
2017-04-11 18:21 ` Tulio Magno Quites Machado Filho
2017-04-03 21:20 ` [PATCH 8/9] powerpc: refactor memcpy and mempcpy IFUNC Wainer dos Santos Moschetta
2017-04-03 21:20 ` [PATCH 9/9] powerpc: refactor memcmp and memmove IFUNC Wainer dos Santos Moschetta
2017-04-03 21:20 ` [PATCH 5/9] powerpc: refactor strcasestr and strstr IFUNC Wainer dos Santos Moschetta
2017-04-03 21:20 ` [PATCH 6/9] powerpc: refactor memset IFUNC Wainer dos Santos Moschetta
2017-04-03 21:20 ` [PATCH 7/9] powerpc: refactor memchr, memrchr, and rawmemchr IFUNC Wainer dos Santos Moschetta
2017-04-10 8:42 ` [PATCH 0/9] powerpc: cleanup IFUNC implementations Rajalakshmi Srinivasaraghavan
2017-04-10 18:17 ` Adhemerval Zanella
2017-04-11 20:22 ` Tulio Magno Quites Machado Filho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ab767062e11986feeb6c2608afd8c7c51c0e79a5.1491252969.git.wainersm@linux.vnet.ibm.com \
--to=wainersm@linux.vnet.ibm.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).