]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
powerpc: refactor stpcpy, stpncpy, strcpy, and strncpy IFUNC.
authorWainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
Tue, 11 Apr 2017 17:18:34 +0000 (14:18 -0300)
committerTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Tue, 11 Apr 2017 20:13:31 +0000 (17:13 -0300)
Clean up the IFUNC implementations for powerpc in order to remove
unneeded macro definitions.

Tested on ppc64le with and without --disable-multi-arch flag.

* 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.

ChangeLog
sysdeps/powerpc/powerpc64/multiarch/stpcpy-power8.S
sysdeps/powerpc/powerpc64/multiarch/stpncpy-power7.S
sysdeps/powerpc/powerpc64/multiarch/stpncpy-power8.S
sysdeps/powerpc/powerpc64/multiarch/strcpy-power8.S
sysdeps/powerpc/powerpc64/multiarch/strncpy-power7.S
sysdeps/powerpc/powerpc64/multiarch/strncpy-power8.S
sysdeps/powerpc/powerpc64/power7/strncpy.S
sysdeps/powerpc/powerpc64/power8/strcpy.S
sysdeps/powerpc/powerpc64/power8/strncpy.S

index 5df70040e3a2ac7310dd9c0ac09abb020f169459..d4bbc560f4a6e6c7998cb800412b6c09ee2d54a3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2017-04-11  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.
+
 2017-04-11  Paul Clarke  <pc@us.ibm.com>
 
        * elf/elf.h (AT_L1I_CACHESIZE, AT_L1I_CACHEGEOMETRY, AT_L1D_CACHESIZE,
index a614b5b85fce4f0965e673c431f78335bf3f149b..935347115a4acc592ec72222712f4c3d0a4decd8 100644 (file)
 
 #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)
index 6c88da383ece47c54dc61c50fd0e188b97befa97..6636b01d07348a9fffda2cbb18ac71774493199a 100644 (file)
 
 #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)
index ff6d3ddc7ea4e831d4ac36cec110f0ba4ba32c7b..6ce706a8793232a981d1dc5dcb112aedba9c0871 100644 (file)
 
 #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)
index 576d26038d8214f7e700fb998d6d954176a1cd7a..6c753b5d1a8c9e45f7fa145a8b5cd44a8515e81d 100644 (file)
 
 #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)
index 5387e4922fb5cc8daed9b433f2cd78d6d83877f2..03f7f834485235764f81adde9db2d80e562d4dac 100644 (file)
 
 #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)
index 37902cfc0a896ec137666a1c2ea2bc11189833e1..17117eb7eca703823bc0935a28357947b42e5dc2 100644 (file)
 
 #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)
index 98aabda6e97fa0c9b09a6af1f747145878aa4fbf..0224f7489809a316accc5e80b04a8cf625df0a6b 100644 (file)
       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)
 
index 27440cd4ddfba864e094a7f678b2cdd4ca62fdd2..7f2cee4b1b13c9da9a5cfa16338ab062cb208d8b 100644 (file)
 #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
 
index 622a55d983da7068f61bba736828ab04aae0e76a..6d40f30ff7015cdea89516f955873724ff74eb4a 100644 (file)
 #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