diff options
author | markus <> | 2003-05-12 02:18:40 +0000 |
---|---|---|
committer | markus <> | 2003-05-12 02:18:40 +0000 |
commit | d4fcd82bb7f6d603bd61e19a81ba97337b89dfca (patch) | |
tree | d52e3a0f1f08f65ad283027e560e17ed0d720462 /src/lib/libcrypto/md4/md4_dgst.c | |
parent | 582bbd139cd2afd58d10dc051c5b0b989b441074 (diff) | |
download | openbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.tar.gz openbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.tar.bz2 openbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.zip |
merge 0.9.7b with local changes; crank majors for libssl/libcrypto
Diffstat (limited to 'src/lib/libcrypto/md4/md4_dgst.c')
-rw-r--r-- | src/lib/libcrypto/md4/md4_dgst.c | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/src/lib/libcrypto/md4/md4_dgst.c b/src/lib/libcrypto/md4/md4_dgst.c index 6446f5f5e7..7afb7185b6 100644 --- a/src/lib/libcrypto/md4/md4_dgst.c +++ b/src/lib/libcrypto/md4/md4_dgst.c | |||
@@ -86,21 +86,7 @@ int MD4_Init(MD4_CTX *c) | |||
86 | void md4_block_host_order (MD4_CTX *c, const void *data, int num) | 86 | void md4_block_host_order (MD4_CTX *c, const void *data, int num) |
87 | { | 87 | { |
88 | const MD4_LONG *X=data; | 88 | const MD4_LONG *X=data; |
89 | register unsigned long A,B,C,D; | 89 | register unsigned MD32_REG_T A,B,C,D; |
90 | /* | ||
91 | * In case you wonder why A-D are declared as long and not | ||
92 | * as MD4_LONG. Doing so results in slight performance | ||
93 | * boost on LP64 architectures. The catch is we don't | ||
94 | * really care if 32 MSBs of a 64-bit register get polluted | ||
95 | * with eventual overflows as we *save* only 32 LSBs in | ||
96 | * *either* case. Now declaring 'em long excuses the compiler | ||
97 | * from keeping 32 MSBs zeroed resulting in 13% performance | ||
98 | * improvement under SPARC Solaris7/64 and 5% under AlphaLinux. | ||
99 | * Well, to be honest it should say that this *prevents* | ||
100 | * performance degradation. | ||
101 | * | ||
102 | * <appro@fy.chalmers.se> | ||
103 | */ | ||
104 | 90 | ||
105 | A=c->A; | 91 | A=c->A; |
106 | B=c->B; | 92 | B=c->B; |
@@ -176,25 +162,11 @@ void md4_block_host_order (MD4_CTX *c, const void *data, int num) | |||
176 | void md4_block_data_order (MD4_CTX *c, const void *data_, int num) | 162 | void md4_block_data_order (MD4_CTX *c, const void *data_, int num) |
177 | { | 163 | { |
178 | const unsigned char *data=data_; | 164 | const unsigned char *data=data_; |
179 | register unsigned long A,B,C,D,l; | 165 | register unsigned MD32_REG_T A,B,C,D,l; |
180 | /* | ||
181 | * In case you wonder why A-D are declared as long and not | ||
182 | * as MD4_LONG. Doing so results in slight performance | ||
183 | * boost on LP64 architectures. The catch is we don't | ||
184 | * really care if 32 MSBs of a 64-bit register get polluted | ||
185 | * with eventual overflows as we *save* only 32 LSBs in | ||
186 | * *either* case. Now declaring 'em long excuses the compiler | ||
187 | * from keeping 32 MSBs zeroed resulting in 13% performance | ||
188 | * improvement under SPARC Solaris7/64 and 5% under AlphaLinux. | ||
189 | * Well, to be honest it should say that this *prevents* | ||
190 | * performance degradation. | ||
191 | * | ||
192 | * <appro@fy.chalmers.se> | ||
193 | */ | ||
194 | #ifndef MD32_XARRAY | 166 | #ifndef MD32_XARRAY |
195 | /* See comment in crypto/sha/sha_locl.h for details. */ | 167 | /* See comment in crypto/sha/sha_locl.h for details. */ |
196 | unsigned long XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7, | 168 | unsigned MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7, |
197 | XX8, XX9,XX10,XX11,XX12,XX13,XX14,XX15; | 169 | XX8, XX9,XX10,XX11,XX12,XX13,XX14,XX15; |
198 | # define X(i) XX##i | 170 | # define X(i) XX##i |
199 | #else | 171 | #else |
200 | MD4_LONG XX[MD4_LBLOCK]; | 172 | MD4_LONG XX[MD4_LBLOCK]; |