From 6c1fc273f3b470ca4aff313ea9abaaab4e41f7b8 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Tue, 25 Oct 2005 15:55:06 +0000 Subject: [PATCH] Eliminate false preprocessor dependencies introduced with VOS support. --- crypto/md32_common.h | 2 ++ crypto/md4/md4_locl.h | 3 ++- crypto/md5/md5_locl.h | 10 +++++----- crypto/ripemd/rmd_locl.h | 7 +++---- crypto/sha/sha_locl.h | 12 +++++------- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/crypto/md32_common.h b/crypto/md32_common.h index 0e625a8e55..2afe045c5d 100644 --- a/crypto/md32_common.h +++ b/crypto/md32_common.h @@ -288,6 +288,7 @@ # if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) # if ((defined(__i386) || defined(__i386__)) && !defined(I386_ONLY)) || \ (defined(__x86_64) || defined(__x86_64__)) +# if !defined(B_ENDIAN) /* * This gives ~30-40% performance improvement in SHA-256 compiled * with gcc [on P4]. Well, first macro to be frank. We can pull @@ -300,6 +301,7 @@ # define HOST_l2c(l,c) ({ unsigned int r=(l); \ asm ("bswapl %0":"=r"(r):"0"(r)); \ *((unsigned int *)(c))=r; (c)+=4; r; }) +# endif # endif # endif #endif diff --git a/crypto/md4/md4_locl.h b/crypto/md4/md4_locl.h index abc7b9bb84..625b587fde 100644 --- a/crypto/md4/md4_locl.h +++ b/crypto/md4/md4_locl.h @@ -68,7 +68,8 @@ void md4_block_host_order (MD4_CTX *c, const void *p,size_t num); void md4_block_data_order (MD4_CTX *c, const void *p,size_t num); -#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) +#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) || \ + defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64) # if !defined(B_ENDIAN) /* * *_block_host_order is expected to handle aligned data while diff --git a/crypto/md5/md5_locl.h b/crypto/md5/md5_locl.h index e1c3274c7a..d1375dd9f4 100644 --- a/crypto/md5/md5_locl.h +++ b/crypto/md5/md5_locl.h @@ -66,10 +66,9 @@ #endif #ifdef MD5_ASM -# if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) || defined(__x86_64) || defined(__x86_64__) -# if !defined(B_ENDIAN) -# define md5_block_host_order md5_block_asm_host_order -# endif +# if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) || \ + defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64) +# define md5_block_host_order md5_block_asm_host_order # elif defined(__sparc) && defined(OPENSSL_SYS_ULTRASPARC) void md5_block_asm_data_order_aligned (MD5_CTX *c, const MD5_LONG *p,size_t num); # define HASH_BLOCK_DATA_ORDER_ALIGNED md5_block_asm_data_order_aligned @@ -82,7 +81,8 @@ void md5_block_host_order (MD5_CTX *c, const void *p,size_t num); void md5_block_data_order (MD5_CTX *c, const void *p,size_t num); -#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) || defined(__x86_64) || defined(__x86_64__) +#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) || \ + defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64) # if !defined(B_ENDIAN) /* * *_block_host_order is expected to handle aligned data while diff --git a/crypto/ripemd/rmd_locl.h b/crypto/ripemd/rmd_locl.h index b52d786165..bb66dfa475 100644 --- a/crypto/ripemd/rmd_locl.h +++ b/crypto/ripemd/rmd_locl.h @@ -72,16 +72,15 @@ */ #ifdef RMD160_ASM # if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) -# if !defined(B_ENDIAN) -# define ripemd160_block_host_order ripemd160_block_asm_host_order -# endif +# define ripemd160_block_host_order ripemd160_block_asm_host_order # endif #endif void ripemd160_block_host_order (RIPEMD160_CTX *c, const void *p,size_t num); void ripemd160_block_data_order (RIPEMD160_CTX *c, const void *p,size_t num); -#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) +#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) || \ + defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64) # if !defined(B_ENDIAN) # define ripemd160_block_data_order ripemd160_block_host_order # endif diff --git a/crypto/sha/sha_locl.h b/crypto/sha/sha_locl.h index 6281313a45..d1f64c5fd0 100644 --- a/crypto/sha/sha_locl.h +++ b/crypto/sha/sha_locl.h @@ -116,13 +116,11 @@ # ifdef SHA1_ASM # if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__) -# if !defined(B_ENDIAN) -# define sha1_block_host_order sha1_block_asm_host_order -# define DONT_IMPLEMENT_BLOCK_HOST_ORDER -# define sha1_block_data_order sha1_block_asm_data_order -# define DONT_IMPLEMENT_BLOCK_DATA_ORDER -# define HASH_BLOCK_DATA_ORDER_ALIGNED sha1_block_asm_data_order -# endif +# define sha1_block_host_order sha1_block_asm_host_order +# define DONT_IMPLEMENT_BLOCK_HOST_ORDER +# define sha1_block_data_order sha1_block_asm_data_order +# define DONT_IMPLEMENT_BLOCK_DATA_ORDER +# define HASH_BLOCK_DATA_ORDER_ALIGNED sha1_block_asm_data_order # elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64) # define sha1_block_host_order sha1_block_asm_host_order # define DONT_IMPLEMENT_BLOCK_HOST_ORDER -- 2.25.1