diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_lcl.h')
| -rw-r--r-- | src/lib/libcrypto/bn/bn_lcl.h | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/lib/libcrypto/bn/bn_lcl.h b/src/lib/libcrypto/bn/bn_lcl.h index eecfd8cc99..8e5e98e3f2 100644 --- a/src/lib/libcrypto/bn/bn_lcl.h +++ b/src/lib/libcrypto/bn/bn_lcl.h | |||
| @@ -238,7 +238,7 @@ extern "C" { | |||
| 238 | # if defined(__DECC) | 238 | # if defined(__DECC) |
| 239 | # include <c_asm.h> | 239 | # include <c_asm.h> |
| 240 | # define BN_UMULT_HIGH(a,b) (BN_ULONG)asm("umulh %a0,%a1,%v0",(a),(b)) | 240 | # define BN_UMULT_HIGH(a,b) (BN_ULONG)asm("umulh %a0,%a1,%v0",(a),(b)) |
| 241 | # elif defined(__GNUC__) && __GNUC__>=2 | 241 | # elif defined(__GNUC__) |
| 242 | # define BN_UMULT_HIGH(a,b) ({ \ | 242 | # define BN_UMULT_HIGH(a,b) ({ \ |
| 243 | register BN_ULONG ret; \ | 243 | register BN_ULONG ret; \ |
| 244 | asm ("umulh %1,%2,%0" \ | 244 | asm ("umulh %1,%2,%0" \ |
| @@ -247,7 +247,7 @@ extern "C" { | |||
| 247 | ret; }) | 247 | ret; }) |
| 248 | # endif /* compiler */ | 248 | # endif /* compiler */ |
| 249 | # elif defined(_ARCH_PPC) && defined(__64BIT__) && defined(SIXTY_FOUR_BIT_LONG) | 249 | # elif defined(_ARCH_PPC) && defined(__64BIT__) && defined(SIXTY_FOUR_BIT_LONG) |
| 250 | # if defined(__GNUC__) && __GNUC__>=2 | 250 | # if defined(__GNUC__) |
| 251 | # define BN_UMULT_HIGH(a,b) ({ \ | 251 | # define BN_UMULT_HIGH(a,b) ({ \ |
| 252 | register BN_ULONG ret; \ | 252 | register BN_ULONG ret; \ |
| 253 | asm ("mulhdu %0,%1,%2" \ | 253 | asm ("mulhdu %0,%1,%2" \ |
| @@ -257,7 +257,7 @@ extern "C" { | |||
| 257 | # endif /* compiler */ | 257 | # endif /* compiler */ |
| 258 | # elif (defined(__x86_64) || defined(__x86_64__)) && \ | 258 | # elif (defined(__x86_64) || defined(__x86_64__)) && \ |
| 259 | (defined(SIXTY_FOUR_BIT_LONG) || defined(SIXTY_FOUR_BIT)) | 259 | (defined(SIXTY_FOUR_BIT_LONG) || defined(SIXTY_FOUR_BIT)) |
| 260 | # if defined(__GNUC__) && __GNUC__>=2 | 260 | # if defined(__GNUC__) |
| 261 | # define BN_UMULT_HIGH(a,b) ({ \ | 261 | # define BN_UMULT_HIGH(a,b) ({ \ |
| 262 | register BN_ULONG ret,discard; \ | 262 | register BN_ULONG ret,discard; \ |
| 263 | asm ("mulq %3" \ | 263 | asm ("mulq %3" \ |
| @@ -280,19 +280,6 @@ extern "C" { | |||
| 280 | # define BN_UMULT_HIGH(a,b) __umulh((a),(b)) | 280 | # define BN_UMULT_HIGH(a,b) __umulh((a),(b)) |
| 281 | # define BN_UMULT_LOHI(low,high,a,b) ((low)=_umul128((a),(b),&(high))) | 281 | # define BN_UMULT_LOHI(low,high,a,b) ((low)=_umul128((a),(b),&(high))) |
| 282 | # endif | 282 | # endif |
| 283 | # elif defined(__mips) && (defined(SIXTY_FOUR_BIT) || defined(SIXTY_FOUR_BIT_LONG)) | ||
| 284 | # if defined(__GNUC__) && __GNUC__>=2 | ||
| 285 | # define BN_UMULT_HIGH(a,b) ({ \ | ||
| 286 | register BN_ULONG ret; \ | ||
| 287 | asm ("dmultu %1,%2" \ | ||
| 288 | : "=h"(ret) \ | ||
| 289 | : "r"(a), "r"(b) : "l"); \ | ||
| 290 | ret; }) | ||
| 291 | # define BN_UMULT_LOHI(low,high,a,b) \ | ||
| 292 | asm ("dmultu %2,%3" \ | ||
| 293 | : "=l"(low),"=h"(high) \ | ||
| 294 | : "r"(a), "r"(b)); | ||
| 295 | # endif | ||
| 296 | # endif /* cpu */ | 283 | # endif /* cpu */ |
| 297 | #endif /* OPENSSL_NO_ASM */ | 284 | #endif /* OPENSSL_NO_ASM */ |
| 298 | 285 | ||
| @@ -472,10 +459,6 @@ extern "C" { | |||
| 472 | } | 459 | } |
| 473 | #endif /* !BN_LLONG */ | 460 | #endif /* !BN_LLONG */ |
| 474 | 461 | ||
| 475 | #if defined(OPENSSL_DOING_MAKEDEPEND) && defined(OPENSSL_FIPS) | ||
| 476 | #undef bn_div_words | ||
| 477 | #endif | ||
| 478 | |||
| 479 | void bn_mul_normal(BN_ULONG *r,BN_ULONG *a,int na,BN_ULONG *b,int nb); | 462 | void bn_mul_normal(BN_ULONG *r,BN_ULONG *a,int na,BN_ULONG *b,int nb); |
| 480 | void bn_mul_comba8(BN_ULONG *r,BN_ULONG *a,BN_ULONG *b); | 463 | void bn_mul_comba8(BN_ULONG *r,BN_ULONG *a,BN_ULONG *b); |
| 481 | void bn_mul_comba4(BN_ULONG *r,BN_ULONG *a,BN_ULONG *b); | 464 | void bn_mul_comba4(BN_ULONG *r,BN_ULONG *a,BN_ULONG *b); |
