OLD | NEW |
1 /* crypto/bn/bn_lcl.h */ | 1 /* crypto/bn/bn_lcl.h */ |
2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * This package is an SSL implementation written | 5 * This package is an SSL implementation written |
6 * by Eric Young (eay@cryptsoft.com). | 6 * by Eric Young (eay@cryptsoft.com). |
7 * The implementation was written so as to conform with Netscapes SSL. | 7 * The implementation was written so as to conform with Netscapes SSL. |
8 * | 8 * |
9 * This library is free for commercial and non-commercial use as long as | 9 * This library is free for commercial and non-commercial use as long as |
10 * the following conditions are aheared to. The following conditions | 10 * the following conditions are aheared to. The following conditions |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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__) | 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" \ |
254 : "=r"(ret) \ | 254 : "=r"(ret) \ |
255 : "r"(a), "r"(b)); \ | 255 : "r"(a), "r"(b)); \ |
256 ret; }) | 256 ret; }) |
257 # endif /* compiler */ | 257 # endif /* compiler */ |
258 # elif defined(__x86_64) && defined(SIXTY_FOUR_BIT_LONG) | 258 # elif (defined(__x86_64) || defined(__x86_64__)) && \ |
| 259 (defined(SIXTY_FOUR_BIT_LONG) || defined(SIXTY_FOUR_BIT)) |
259 # if defined(__GNUC__) | 260 # if defined(__GNUC__) |
260 # define BN_UMULT_HIGH(a,b) ({ \ | 261 # define BN_UMULT_HIGH(a,b) ({ \ |
261 register BN_ULONG ret,discard; \ | 262 register BN_ULONG ret,discard; \ |
262 asm ("mulq %3" \ | 263 asm ("mulq %3" \ |
263 : "=a"(discard),"=d"(ret) \ | 264 : "=a"(discard),"=d"(ret) \ |
264 : "a"(a), "g"(b) \ | 265 : "a"(a), "g"(b) \ |
265 : "cc"); \ | 266 : "cc"); \ |
266 ret; }) | 267 ret; }) |
267 # define BN_UMULT_LOHI(low,high,a,b) \ | 268 # define BN_UMULT_LOHI(low,high,a,b) \ |
268 asm ("mulq %3" \ | 269 asm ("mulq %3" \ |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 int cl, int dl); | 482 int cl, int dl); |
482 BN_ULONG bn_sub_part_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, | 483 BN_ULONG bn_sub_part_words(BN_ULONG *r, const BN_ULONG *a, const BN_ULONG *b, |
483 int cl, int dl); | 484 int cl, int dl); |
484 int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_U
LONG *np,const BN_ULONG *n0, int num); | 485 int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_U
LONG *np,const BN_ULONG *n0, int num); |
485 | 486 |
486 #ifdef __cplusplus | 487 #ifdef __cplusplus |
487 } | 488 } |
488 #endif | 489 #endif |
489 | 490 |
490 #endif | 491 #endif |
OLD | NEW |