summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib/Makefile
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@c-s.fr>2018-05-30 07:06:15 +0000
committerMichael Ellerman <mpe@ellerman.id.au>2018-06-04 00:39:21 +1000
commit2676b89eb82f56825d7289edf21f17a6461388b7 (patch)
tree88beb79699ed2916ad1d9082613bc11ce792fbd3 /arch/powerpc/lib/Makefile
parentf36bbf21e8b911b3c629fd36d4d217105b47a20e (diff)
downloadtalos-op-linux-2676b89eb82f56825d7289edf21f17a6461388b7.tar.gz
talos-op-linux-2676b89eb82f56825d7289edf21f17a6461388b7.zip
powerpc/lib: optimise PPC32 memcmp
At the time being, memcmp() compares two chunks of memory byte per byte. This patch optimises the comparison by comparing word by word. On the same way as commit 15c2d45d17418 ("powerpc: Add 64bit optimised memcmp"), this patch moves memcmp() into a dedicated file named memcmp_32.S A small benchmark performed on an 8xx comparing two chuncks of 512 bytes performed 100000 times gives: Before : 5852274 TB ticks After: 1488638 TB ticks This is almost 4 times faster Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/lib/Makefile')
-rw-r--r--arch/powerpc/lib/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index 2c9b8c0adf22..d0ca13ad8231 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -26,14 +26,14 @@ obj-$(CONFIG_PPC_BOOK3S_64) += copyuser_power7.o copypage_power7.o \
memcpy_power7.o
obj64-y += copypage_64.o copyuser_64.o mem_64.o hweight_64.o \
- memcpy_64.o memcmp_64.o pmem.o
+ memcpy_64.o pmem.o
obj64-$(CONFIG_SMP) += locks.o
obj64-$(CONFIG_ALTIVEC) += vmx-helper.o
obj64-$(CONFIG_KPROBES_SANITY_TEST) += test_emulate_step.o
obj-y += checksum_$(BITS).o checksum_wrappers.o \
- string_$(BITS).o
+ string_$(BITS).o memcmp_$(BITS).o
obj-y += sstep.o ldstfp.o quad.o
obj64-y += quad.o
OpenPOWER on IntegriCloud