mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
powerpc: refactor memcmp and memmove IFUNC.
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/memcmp-power4.S: Define the implementation-specific function name and remove unneeded macros definition. * sysdeps/powerpc/powerpc64/multiarch/memcmp-power7.S: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memmove-power7.S: Likewise. * sysdeps/powerpc/powerpc64/power4/memcmp.S: Set a default function name if not defined and pass as parameter to macros accordingly. * sysdeps/powerpc/powerpc64/power7/memcmp.S: Likewise. * sysdeps/powerpc/powerpc64/power7/memmove.S: Likewise.
This commit is contained in:
parent
72fd128a08
commit
b6a6622209
10
ChangeLog
10
ChangeLog
@ -1,5 +1,15 @@
|
||||
2017-04-11 Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/powerpc64/multiarch/memcmp-power4.S: Define the
|
||||
implementation-specific function name and remove unneeded
|
||||
macros definition.
|
||||
* sysdeps/powerpc/powerpc64/multiarch/memcmp-power7.S: Likewise.
|
||||
* sysdeps/powerpc/powerpc64/multiarch/memmove-power7.S: Likewise.
|
||||
* sysdeps/powerpc/powerpc64/power4/memcmp.S: Set a default function
|
||||
name if not defined and pass as parameter to macros accordingly.
|
||||
* sysdeps/powerpc/powerpc64/power7/memcmp.S: Likewise.
|
||||
* sysdeps/powerpc/powerpc64/power7/memmove.S: Likewise.
|
||||
|
||||
* sysdeps/powerpc/powerpc64/multiarch/memcpy-a2.S: Define the
|
||||
implementation-specific function name and remove unneeded
|
||||
macros definition.
|
||||
|
@ -18,21 +18,7 @@
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
#undef EALIGN
|
||||
#define EALIGN(name, alignt, words) \
|
||||
.section ".text"; \
|
||||
ENTRY_2(__memcmp_power4) \
|
||||
.align ALIGNARG(alignt); \
|
||||
EALIGN_W_##words; \
|
||||
BODY_LABEL(__memcmp_power4): \
|
||||
cfi_startproc; \
|
||||
LOCALENTRY(__memcmp_power4)
|
||||
|
||||
#undef END
|
||||
#define END(name) \
|
||||
cfi_endproc; \
|
||||
TRACEBACK(__memcmp_power4) \
|
||||
END_2(__memcmp_power4)
|
||||
#define MEMCMP __memcmp_power4
|
||||
|
||||
#undef libc_hidden_builtin_def
|
||||
#define libc_hidden_builtin_def(name)
|
||||
|
@ -18,21 +18,7 @@
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
#undef EALIGN
|
||||
#define EALIGN(name, alignt, words) \
|
||||
.section ".text"; \
|
||||
ENTRY_2(__memcmp_power7) \
|
||||
.align ALIGNARG(alignt); \
|
||||
EALIGN_W_##words; \
|
||||
BODY_LABEL(__memcmp_power7): \
|
||||
cfi_startproc; \
|
||||
LOCALENTRY(__memcmp_power7)
|
||||
|
||||
#undef END
|
||||
#define END(name) \
|
||||
cfi_endproc; \
|
||||
TRACEBACK(__memcmp_power7) \
|
||||
END_2(__memcmp_power7)
|
||||
#define MEMCMP __memcmp_power7
|
||||
|
||||
#undef libc_hidden_builtin_def
|
||||
#define libc_hidden_builtin_def(name)
|
||||
|
@ -18,21 +18,7 @@
|
||||
|
||||
#include <sysdep.h>
|
||||
|
||||
#undef EALIGN
|
||||
#define EALIGN(name, alignt, words) \
|
||||
.section ".text"; \
|
||||
ENTRY_2(__memmove_power7) \
|
||||
.align ALIGNARG(alignt); \
|
||||
EALIGN_W_##words; \
|
||||
BODY_LABEL(__memmove_power7): \
|
||||
cfi_startproc; \
|
||||
LOCALENTRY(__memmove_power7)
|
||||
|
||||
#undef END_GEN_TB
|
||||
#define END_GEN_TB(name, mask) \
|
||||
cfi_endproc; \
|
||||
TRACEBACK_MASK(__memmove_power7,mask) \
|
||||
END_2(__memmove_power7)
|
||||
#define MEMMOVE __memmove_power7
|
||||
|
||||
#undef libc_hidden_builtin_def
|
||||
#define libc_hidden_builtin_def(name)
|
||||
|
@ -22,8 +22,12 @@
|
||||
const char *s2 [r4],
|
||||
size_t size [r5]) */
|
||||
|
||||
#ifndef MEMCMP
|
||||
# define MEMCMP memcmp
|
||||
#endif
|
||||
|
||||
.machine power4
|
||||
EALIGN (memcmp, 4, 0)
|
||||
EALIGN (MEMCMP, 4, 0)
|
||||
CALL_MCOUNT 3
|
||||
|
||||
#define rRTN r3
|
||||
@ -1360,6 +1364,6 @@ L(duzeroLength):
|
||||
li rRTN, 0
|
||||
blr
|
||||
|
||||
END (memcmp)
|
||||
END (MEMCMP)
|
||||
libc_hidden_builtin_def (memcmp)
|
||||
weak_alias (memcmp, bcmp)
|
||||
|
@ -21,9 +21,11 @@
|
||||
/* int [r3] memcmp (const char *s1 [r3],
|
||||
const char *s2 [r4],
|
||||
size_t size [r5]) */
|
||||
|
||||
#ifndef MEMCMP
|
||||
# define MEMCMP memcmp
|
||||
#endif
|
||||
.machine power7
|
||||
EALIGN (memcmp, 4, 0)
|
||||
EALIGN (MEMCMP, 4, 0)
|
||||
CALL_MCOUNT 3
|
||||
|
||||
#define rRTN r3
|
||||
@ -1054,6 +1056,6 @@ L(duzeroLength):
|
||||
li rRTN, 0
|
||||
blr
|
||||
|
||||
END (memcmp)
|
||||
END (MEMCMP)
|
||||
libc_hidden_builtin_def (memcmp)
|
||||
weak_alias (memcmp, bcmp)
|
||||
|
@ -27,8 +27,11 @@
|
||||
If source and destiny overlaps, a optimized backwards memcpy is used
|
||||
instead. */
|
||||
|
||||
#ifndef MEMMOVE
|
||||
# define MEMMOVE memmove
|
||||
#endif
|
||||
.machine power7
|
||||
EALIGN (memmove, 5, 0)
|
||||
EALIGN (MEMMOVE, 5, 0)
|
||||
CALL_MCOUNT 3
|
||||
|
||||
L(_memmove):
|
||||
@ -816,7 +819,7 @@ L(end_unaligned_loop_bwd):
|
||||
stb r8,-7(r11)
|
||||
/* Return original DST pointer. */
|
||||
blr
|
||||
END_GEN_TB (memmove, TB_TOCLESS)
|
||||
END_GEN_TB (MEMMOVE, TB_TOCLESS)
|
||||
libc_hidden_builtin_def (memmove)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user