diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/md32_common.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/lib/libcrypto/md32_common.h b/src/lib/libcrypto/md32_common.h index 1cb783944e..bb7381952a 100644 --- a/src/lib/libcrypto/md32_common.h +++ b/src/lib/libcrypto/md32_common.h | |||
| @@ -165,7 +165,7 @@ | |||
| 165 | asm ( \ | 165 | asm ( \ |
| 166 | "roll %1,%0" \ | 166 | "roll %1,%0" \ |
| 167 | : "=r"(ret) \ | 167 | : "=r"(ret) \ |
| 168 | : "I"(n), "0"(a) \ | 168 | : "I"(n), "0"((unsigned int)(a)) \ |
| 169 | : "cc"); \ | 169 | : "cc"); \ |
| 170 | ret; \ | 170 | ret; \ |
| 171 | }) | 171 | }) |
| @@ -383,6 +383,7 @@ int HASH_FINAL (unsigned char *md, HASH_CTX *c) | |||
| 383 | } | 383 | } |
| 384 | 384 | ||
| 385 | #ifndef MD32_REG_T | 385 | #ifndef MD32_REG_T |
| 386 | #if defined(__alpha) || defined(__sparcv9) || defined(__mips) | ||
| 386 | #define MD32_REG_T long | 387 | #define MD32_REG_T long |
| 387 | /* | 388 | /* |
| 388 | * This comment was originaly written for MD5, which is why it | 389 | * This comment was originaly written for MD5, which is why it |
| @@ -400,9 +401,15 @@ int HASH_FINAL (unsigned char *md, HASH_CTX *c) | |||
| 400 | * Well, to be honest it should say that this *prevents* | 401 | * Well, to be honest it should say that this *prevents* |
| 401 | * performance degradation. | 402 | * performance degradation. |
| 402 | * <appro@fy.chalmers.se> | 403 | * <appro@fy.chalmers.se> |
| 403 | * Apparently there're LP64 compilers that generate better | 404 | */ |
| 404 | * code if A-D are declared int. Most notably GCC-x86_64 | 405 | #else |
| 405 | * generates better code. | 406 | /* |
| 407 | * Above is not absolute and there are LP64 compilers that | ||
| 408 | * generate better code if MD32_REG_T is defined int. The above | ||
| 409 | * pre-processor condition reflects the circumstances under which | ||
| 410 | * the conclusion was made and is subject to further extension. | ||
| 406 | * <appro@fy.chalmers.se> | 411 | * <appro@fy.chalmers.se> |
| 407 | */ | 412 | */ |
| 413 | #define MD32_REG_T int | ||
| 414 | #endif | ||
| 408 | #endif | 415 | #endif |
