From 16c0b6eef9c785412e677fd7fd109c99612b2d05 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 5 Jun 2020 18:37:04 +0000 Subject: [PATCH] skein_block_asm.S: use #ifdef not .ifdef, for Clang IAS Clang IAS does not support the --defsym argument, and .ifndef SKEIN_USE_ASM gets turned into .ifndef 1792 by the preprocessor, which results in error: expected identifier after '.ifdef' .ifndef 1792 ^ Use #ifdef instead, which still works with GNU as. Reviewed by: cem Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25154 --- sys/crypto/skein/amd64/skein_block_asm.s | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/crypto/skein/amd64/skein_block_asm.s b/sys/crypto/skein/amd64/skein_block_asm.s index b2cc28cc709a..a5e1613fe2fe 100644 --- a/sys/crypto/skein/amd64/skein_block_asm.s +++ b/sys/crypto/skein/amd64/skein_block_asm.s @@ -18,20 +18,21 @@ _MASK_ALL_ = (256+512+1024) #all three algorithm bits _MAX_FRAME_ = 240 # ################# -.ifndef SKEIN_USE_ASM +#ifndef SKEIN_USE_ASM _USE_ASM_ = _MASK_ALL_ -.else +#else _USE_ASM_ = SKEIN_USE_ASM -.endif +#endif ################# -.ifndef SKEIN_LOOP #configure loop unrolling +#configure loop unrolling +#ifndef SKEIN_LOOP _SKEIN_LOOP = 2 #default is fully unrolled for 256/512, twice for 1024 -.else +#else _SKEIN_LOOP = SKEIN_LOOP .irp _NN_,%_SKEIN_LOOP #only display loop unrolling if default changed on command line #.print "+++ SKEIN_LOOP = \_NN_" .endr -.endif +#endif # the unroll counts (0 --> fully unrolled) SKEIN_UNROLL_256 = (_SKEIN_LOOP / 100) % 10 SKEIN_UNROLL_512 = (_SKEIN_LOOP / 10) % 10