Page MenuHomeFreeBSD

D7824.id20164.diff
No OneTemporary

D7824.id20164.diff

Index: lib/libmd/Makefile
===================================================================
--- lib/libmd/Makefile
+++ lib/libmd/Makefile
@@ -81,6 +81,8 @@
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../sys/crypto/sha2
CFLAGS+= -I${.CURDIR}/../../sys/crypto/skein
CFLAGS+= -DWEAK_REFS
+# unroll the 256 and 512 loops, half unroll the 1024
+CFLAGS+= -DSKEIN_LOOP=995
.PATH: ${.CURDIR}/${MACHINE_ARCH} ${.CURDIR}/../../sys/crypto/sha2
.PATH: ${.CURDIR}/../../sys/crypto/skein ${.CURDIR}/../../sys/crypto/skein/${MACHINE_ARCH}
@@ -93,7 +95,9 @@
CFLAGS+= -DRMD160_ASM
.endif
.if exists(${MACHINE_ARCH}/skein_block_asm.s)
-AFLAGS += --strip-local-absolute
+AFLAGS+= --strip-local-absolute
+# Fully unroll all loops in the assembly optimized version
+AFLAGS+= --defsym SKEIN_LOOP=0
SRCS+= skein_block_asm.s
CFLAGS+= -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace with assembly: 256+512+1024 = 1792
.endif
Index: sys/modules/crypto/Makefile
===================================================================
--- sys/modules/crypto/Makefile
+++ sys/modules/crypto/Makefile
@@ -19,11 +19,15 @@
SRCS += des_ecb.c des_enc.c des_setkey.c
SRCS += sha1.c sha256c.c sha512c.c
SRCS += skein.c skein_block.c
+# unroll the 256 and 512 loops, half unroll the 1024
+CFLAGS+= -DSKEIN_LOOP=995
.if exists(${MACHINE_ARCH}/skein_block_asm.s)
.PATH: ${.CURDIR}/../../crypto/skein/${MACHINE_ARCH}
SRCS += skein_block_asm.s
CFLAGS += -DSKEIN_ASM -DSKEIN_USE_ASM=1792 # list of block functions to replace with assembly: 256+512+1024 = 1792
ACFLAGS += -DELF -Wa,--noexecstack
+# Fully unroll all loops in the assembly optimized version
+AFLAGS+= --defsym SKEIN_LOOP=0
.endif
SRCS += siphash.c
SRCS += gmac.c gfmult.c

File Metadata

Mime Type
text/plain
Expires
Wed, Sep 9, 12:02 AM (19 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38481296
Default Alt Text
D7824.id20164.diff (1 KB)

Event Timeline