projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f12fc0
)
Get rid of redundant multiplications in bn_div_words.
author
Andy Polyakov
<appro@openssl.org>
Wed, 21 Jul 1999 13:53:01 +0000
(13:53 +0000)
committer
Andy Polyakov
<appro@openssl.org>
Wed, 21 Jul 1999 13:53:01 +0000
(13:53 +0000)
crypto/bn/bn_asm.c
patch
|
blob
|
history
diff --git
a/crypto/bn/bn_asm.c
b/crypto/bn/bn_asm.c
index 7f4c3ff3b2cdb366d2044697440aa5a834a4aafb..286a0f1e74b79967a66d30fffcee3a4c7ed17226 100644
(file)
--- a/
crypto/bn/bn_asm.c
+++ b/
crypto/bn/bn_asm.c
@@
-266,16
+266,16
@@
BN_ULONG bn_div_words(BN_ULONG h, BN_ULONG l, BN_ULONG d)
for (;;)
{
- t=(h-q*dh);
+ t=(h-(th=q*dh));
+ tl=BN_MASK2;
if ((t&BN_MASK2h) ||
- ((dl*q) <= (
- (t<<BN_BITS4)
+
+ ((
tl=
dl*q) <= (
+ (t<<BN_BITS4)
|
((l&BN_MASK2h)>>BN_BITS4))))
break;
q--;
}
- th=q*dh;
- tl=q*dl;
+ if (tl==BN_MASK2) tl=q*dl;
t=(tl>>BN_BITS4);
tl=(tl<<BN_BITS4)&BN_MASK2h;
th+=t;