From a6ef3518f9ac8a1c46a36c8d27173b1f73d839c4 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Fri, 22 Apr 2005 23:08:43 -0700 Subject: [PATCH] PPC assembly implementation of SHA1 Here is a SHA1 implementation with the core written in PPC assembly. On my 2GHz G5, it does 218MB/s, compared to 135MB/s for the openssl version or 45MB/s for the mozilla version. Signed-off-by: Paul Mackerras Signed-off-by: Linus Torvalds --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9573a1189d..57e7023950 100644 --- a/Makefile +++ b/Makefile @@ -33,10 +33,15 @@ LIBS += -lz ifdef MOZILLA_SHA1 SHA1_HEADER="mozilla-sha1/sha1.h" LIB_OBJS += mozilla-sha1/sha1.o +else +ifdef PPC_SHA1 + SHA1_HEADER="ppc/sha1.h" + LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o else SHA1_HEADER= LIBS += -lssl endif +endif CFLAGS += '-DSHA1_HEADER=$(SHA1_HEADER)' @@ -77,7 +82,7 @@ unpack-file.o: $(LIB_H) write-tree.o: $(LIB_H) clean: - rm -f *.o mozilla-sha1/*.o $(PROG) $(LIB_FILE) + rm -f *.o mozilla-sha1/*.o ppc/*.o $(PROG) $(LIB_FILE) backup: clean cd .. ; tar czvf dircache.tar.gz dir-cache -- cgit v1.2.1