Skip to contentSkip to conversation

crypto: serpent - add common glue code for avx and sse2 implementation

PATCH New Johannes Goetzfried 1 participant 1 message May 28, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: serpent - add common glue code for avx and sse2 implementation

This patch moves most of the duplicated glue code from the avx and sse2 implemenation to a new file called serpent_common_glue.c. This reduces code size and redundancy.

---
 arch/x86/crypto/Makefile              |    9 +-
 arch/x86/crypto/serpent_avx_glue.c    |  733 ++------------------------------
 arch/x86/crypto/serpent_common_glue.c |  686 ++++++++++++++++++++++++++++++
 arch/x86/crypto/serpent_sse2_glue.c   |  744 ++-------------------------------
 arch/x86/include/asm/serpent.h        |   55 +++
 5 files changed, 828 insertions(+), 1399 deletions(-)
 create mode 100644 arch/x86/crypto/serpent_common_glue.c
arch/x86/crypto/Makefile +6 -3
index 8ef7ba5..fe27cc6 100644
@@ -24,7 +24,8 @@ obj-$(CONFIG_CRYPTO_SHA1_SSSE3) += sha1-ssse3.o
 aes-i586-y := aes-i586-asm_32.o aes_glue.o
 twofish-i586-y := twofish-i586-asm_32.o twofish_glue.o
 salsa20-i586-y := salsa20-i586-asm_32.o salsa20_glue.o
-serpent-sse2-i586-y := serpent-sse2-i586-asm_32.o serpent_sse2_glue.o
+serpent-sse2-i586-y := serpent-sse2-i586-asm_32.o serpent_sse2_glue.o \
+		       serpent_common_glue.o
 
 aes-x86_64-y := aes-x86_64-asm_64.o aes_glue.o
 camellia-x86_64-y := camellia-x86_64-asm_64.o camellia_glue.o
@@ -32,8 +33,10 @@ blowfish-x86_64-y := blowfish-x86_64-asm_64.o blowfish_glue.o
 twofish-x86_64-y := twofish-x86_64-asm_64.o twofish_glue.o
 twofish-x86_64-3way-y := twofish-x86_64-asm_64-3way.o twofish_glue_3way.o
 salsa20-x86_64-y := salsa20-x86_64-asm_64.o salsa20_glue.o
-serpent-sse2-x86_64-y := serpent-sse2-x86_64-asm_64.o serpent_sse2_glue.o
-serpent-avx-x86_64-y := serpent-avx-x86_64-asm_64.o serpent_avx_glue.o
+serpent-sse2-x86_64-y := serpent-sse2-x86_64-asm_64.o serpent_sse2_glue.o \
+			 serpent_common_glue.o
+serpent-avx-x86_64-y := serpent-avx-x86_64-asm_64.o serpent_avx_glue.o \
+			serpent_common_glue.o
 
 aesni-intel-y := aesni-intel_asm.o aesni-intel_glue.o fpu.o
 
arch/x86/crypto/serpent_avx_glue.c +38 -695

848 lines not on this page · raw message

arch/x86/crypto/serpent_common_glue.c new file +686 -0

686 lines not on this page · raw message

arch/x86/crypto/serpent_sse2_glue.c +43 -701

859 lines not on this page · raw message

arch/x86/include/asm/serpent.h +55 -0

61 lines not on this page · raw message

Signature · 1 line
1.7.2.5