Commit 5dd955dc authored by Ulf Möller's avatar Ulf Möller
Browse files

openbsd-x86 macros

Submitted by: Toomas Kiisk <vix@cyber.ee>
parent 56fa8e69
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -130,7 +130,7 @@ int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
#if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) \
#if !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) \
    && !defined(PEDANTIC) && !defined(BN_DIV3W)
    && !defined(PEDANTIC) && !defined(BN_DIV3W)
# if defined(__GNUC__) && __GNUC__>=2
# if defined(__GNUC__) && __GNUC__>=2
#  if defined(__i386)
#  if defined(__i386) || defined (__i386__)
   /*
   /*
    * There were two reasons for implementing this template:
    * There were two reasons for implementing this template:
    * - GNU C generates a call to a function (__udivdi3 to be exact)
    * - GNU C generates a call to a function (__udivdi3 to be exact)
+1 −1
Original line number Original line Diff line number Diff line
@@ -66,7 +66,7 @@
#include "cryptlib.h"
#include "cryptlib.h"
#include "bn_lcl.h"
#include "bn_lcl.h"


#if defined(OPENSSL_NO_ASM) || !defined(__i386) /* Assembler implementation exists only for x86 */
#if defined(OPENSSL_NO_ASM) || !(defined(__i386) || defined(__i386__))/* Assembler implementation exists only for x86 */
/* Here follows specialised variants of bn_add_words() and
/* Here follows specialised variants of bn_add_words() and
   bn_sub_words().  They have the property performing operations on
   bn_sub_words().  They have the property performing operations on
   arrays of different sizes.  The sizes of those arrays is expressed through
   arrays of different sizes.  The sizes of those arrays is expressed through
+2 −2
Original line number Original line Diff line number Diff line
@@ -198,7 +198,7 @@
   *
   *
   * 					<appro@fy.chalmers.se>
   * 					<appro@fy.chalmers.se>
   */
   */
#  if defined(__i386)
#  if defined(__i386) || defined(__i386__)
#   define ROTATE(a,n)	({ register unsigned int ret;	\
#   define ROTATE(a,n)	({ register unsigned int ret;	\
				asm (			\
				asm (			\
				"roll %1,%0"		\
				"roll %1,%0"		\
@@ -224,7 +224,7 @@
 */
 */
# if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM)
# if defined(__GNUC__) && __GNUC__>=2 && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM)
  /* some GNU C inline assembler templates by <appro@fy.chalmers.se> */
  /* some GNU C inline assembler templates by <appro@fy.chalmers.se> */
#  if defined(__i386) && !defined(I386_ONLY)
#  if (defined(__i386) || defined(__i386__)) && !defined(I386_ONLY)
#   define BE_FETCH32(a)	({ register unsigned int l=(a);\
#   define BE_FETCH32(a)	({ register unsigned int l=(a);\
				asm (			\
				asm (			\
				"bswapl %0"		\
				"bswapl %0"		\
+1 −1
Original line number Original line Diff line number Diff line
@@ -68,7 +68,7 @@
void md4_block_host_order (MD4_CTX *c, const void *p,int num);
void md4_block_host_order (MD4_CTX *c, const void *p,int num);
void md4_block_data_order (MD4_CTX *c, const void *p,int num);
void md4_block_data_order (MD4_CTX *c, const void *p,int num);


#if defined(__i386) || defined(_M_IX86) || defined(__INTEL__)
#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__)
/*
/*
 * *_block_host_order is expected to handle aligned data while
 * *_block_host_order is expected to handle aligned data while
 * *_block_data_order - unaligned. As algorithm and host (x86)
 * *_block_data_order - unaligned. As algorithm and host (x86)
+2 −2
Original line number Original line Diff line number Diff line
@@ -66,7 +66,7 @@
#endif
#endif


#ifdef MD5_ASM
#ifdef MD5_ASM
# if defined(__i386) || defined(_M_IX86) || defined(__INTEL__)
# if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__)
#  define md5_block_host_order md5_block_asm_host_order
#  define md5_block_host_order md5_block_asm_host_order
# elif defined(__sparc) && defined(OPENSSL_SYS_ULTRASPARC)
# elif defined(__sparc) && defined(OPENSSL_SYS_ULTRASPARC)
   void md5_block_asm_data_order_aligned (MD5_CTX *c, const MD5_LONG *p,int num);
   void md5_block_asm_data_order_aligned (MD5_CTX *c, const MD5_LONG *p,int num);
@@ -77,7 +77,7 @@
void md5_block_host_order (MD5_CTX *c, const void *p,int num);
void md5_block_host_order (MD5_CTX *c, const void *p,int num);
void md5_block_data_order (MD5_CTX *c, const void *p,int num);
void md5_block_data_order (MD5_CTX *c, const void *p,int num);


#if defined(__i386) || defined(_M_IX86) || defined(__INTEL__)
#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(__INTEL__)
/*
/*
 * *_block_host_order is expected to handle aligned data while
 * *_block_host_order is expected to handle aligned data while
 * *_block_data_order - unaligned. As algorithm and host (x86)
 * *_block_data_order - unaligned. As algorithm and host (x86)
Loading