summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/powerpc64/power8/memcmp.S
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2019-12-16 21:19:30 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-12-16 21:19:30 +0100
commit10f1958417a4944a60a08230eae6a639209d52f8 (patch)
tree7662166d1cf40507e65fba6dbb9ee73a7c652afc /sysdeps/powerpc/powerpc64/power8/memcmp.S
parent963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff)
parenta2e487ce1c59d19345d9ecacc58de79febd869e4 (diff)
Merge branch 'master' of git://sourceware.org/git/glibc into upstreamupstream
Diffstat (limited to 'sysdeps/powerpc/powerpc64/power8/memcmp.S')
-rw-r--r--sysdeps/powerpc/powerpc64/power8/memcmp.S25
1 files changed, 11 insertions, 14 deletions
diff --git a/sysdeps/powerpc/powerpc64/power8/memcmp.S b/sysdeps/powerpc/powerpc64/power8/memcmp.S
index ec4ccf3382..41b440ea5a 100644
--- a/sysdeps/powerpc/powerpc64/power8/memcmp.S
+++ b/sysdeps/powerpc/powerpc64/power8/memcmp.S
@@ -1,5 +1,5 @@
/* Optimized memcmp implementation for POWER7/PowerPC64.
- Copyright (C) 2010-2018 Free Software Foundation, Inc.
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -14,7 +14,7 @@
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#include <sysdep.h>
@@ -22,13 +22,10 @@
const char *s2 [r4],
size_t size [r5]) */
-/* TODO: change these to the actual instructions when the minimum required
- binutils allows it. */
-#define MFVRD(r,v) .long (0x7c000067 | ((v)<<(32-11)) | ((r)<<(32-16)))
#ifndef MEMCMP
# define MEMCMP memcmp
#endif
- .machine power7
+ .machine power8
ENTRY_TOCLESS (MEMCMP, 4)
CALL_MCOUNT 3
@@ -231,15 +228,15 @@ L(different2):
vperm v4, v4, v0, v9
vperm v5, v5, v0, v9
#endif
- MFVRD(r7, v4)
- MFVRD(r9, v5)
+ mfvrd r7, v4
+ mfvrd r9, v5
cmpld cr6, r7, r9
bne cr6, L(ret_diff)
/* Difference in second DW. */
vsldoi v4, v4, v4, 8
vsldoi v5, v5, v5, 8
- MFVRD(r7, v4)
- MFVRD(r9, v5)
+ mfvrd r7, v4
+ mfvrd r9, v5
cmpld cr6, r7, r9
L(ret_diff):
li rRTN, 1
@@ -256,15 +253,15 @@ L(different3):
vperm v6, v6, v0, v9
vperm v8, v8, v0, v9
#endif
- MFVRD(r7, v6)
- MFVRD(r9, v8)
+ mfvrd r7, v6
+ mfvrd r9, v8
cmpld cr6, r7, r9
bne cr6, L(ret_diff)
/* Difference in second DW. */
vsldoi v6, v6, v6, 8
vsldoi v8, v8, v8, 8
- MFVRD(r7, v6)
- MFVRD(r9, v8)
+ mfvrd r7, v6
+ mfvrd r9, v8
cmpld cr6, r7, r9
li rRTN, 1
bgtlr cr6