From 7c2ff8ebfe1473ee81bad41d1a63316f303f7e5d Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Tue, 5 Jan 2016 23:55:06 +0100 Subject: [PATCH] show ROtate operator configuration in build settings [skip ci] --- src/headers/tomcrypt_macros.h | 3 +++ src/misc/crypt/crypt.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/headers/tomcrypt_macros.h b/src/headers/tomcrypt_macros.h index f0dcf68..2bb60cf 100644 --- a/src/headers/tomcrypt_macros.h +++ b/src/headers/tomcrypt_macros.h @@ -235,6 +235,7 @@ do { x = (((ulong64)((y)[7] & 255))<<56)|(((ulong64)((y)[6] & 255))<<48) | \ /* 32-bit Rotates */ #if defined(_MSC_VER) +#define LTC_ROx_ASM /* instrinsic rotate */ #include @@ -245,6 +246,7 @@ do { x = (((ulong64)((y)[7] & 255))<<56)|(((ulong64)((y)[6] & 255))<<48) | \ #define ROLc(x,n) _lrotl(x,n) #elif !defined(__STRICT_ANSI__) && defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && !defined(INTEL_CC) && !defined(LTC_NO_ASM) +#define LTC_ROx_ASM static inline ulong32 ROL(ulong32 word, int i) { @@ -289,6 +291,7 @@ static inline ulong32 ROR(ulong32 word, int i) #endif #elif !defined(__STRICT_ANSI__) && defined(LTC_PPC32) +#define LTC_ROx_ASM static inline ulong32 ROL(ulong32 word, int i) { diff --git a/src/misc/crypt/crypt.c b/src/misc/crypt/crypt.c index dca18d0..d277901 100644 --- a/src/misc/crypt/crypt.c +++ b/src/misc/crypt/crypt.c @@ -400,6 +400,12 @@ const char *crypt_build_settings = #if defined(LTC_NO_ASM) " LTC_NO_ASM " #endif +#if defined(LTC_ROx_ASM) + " LTC_ROx_ASM " +#if defined(LTC_NO_ROLC) + " LTC_NO_ROLC " +#endif +#endif #if defined(LTC_NO_TEST) " LTC_NO_TEST " #endif