# HG changeset patch # User Claus Gittinger # Date 927152835 -7200 # Node ID ba20de3793e2383133972ed673d6b89f51a1d63b # Parent a66f711d86dfd311576ce45aa1a6d34a46dd07eb slightly tuned largeInt - largeInt for intel diff -r a66f711d86df -r ba20de3793e2 LargeInt.st --- a/LargeInt.st Thu May 20 00:16:51 1999 +0200 +++ b/LargeInt.st Thu May 20 00:27:15 1999 +0200 @@ -2372,6 +2372,20 @@ __myDigits = __ByteArrayInstPtr(_digitByteArray)->ba_element; __index = 1; +#ifdef i386 + while (__index < __minLen) { + __diff = __borrow + ((unsigned short *)(__myDigits+__index-1))[0] - ((unsigned short *)(__otherDigits+__index-1))[0]; + if (__diff >= 0) { + __borrow = 0; + } else { + __borrow = -1; + __diff += 0x10000; + } + ((unsigned short *)(__resultDigits+__index-1))[0] = __diff; + __index += 2; + } +#endif + while (__index <= __minLen) { __diff = __borrow + __myDigits[__index-1] - __otherDigits[__index-1]; if (__diff >= 0) { @@ -3317,5 +3331,5 @@ !LargeInteger class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Attic/LargeInt.st,v 1.103 1999-05-19 22:16:51 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Attic/LargeInt.st,v 1.104 1999-05-19 22:27:15 cg Exp $' ! ! diff -r a66f711d86df -r ba20de3793e2 LargeInteger.st --- a/LargeInteger.st Thu May 20 00:16:51 1999 +0200 +++ b/LargeInteger.st Thu May 20 00:27:15 1999 +0200 @@ -2372,6 +2372,20 @@ __myDigits = __ByteArrayInstPtr(_digitByteArray)->ba_element; __index = 1; +#ifdef i386 + while (__index < __minLen) { + __diff = __borrow + ((unsigned short *)(__myDigits+__index-1))[0] - ((unsigned short *)(__otherDigits+__index-1))[0]; + if (__diff >= 0) { + __borrow = 0; + } else { + __borrow = -1; + __diff += 0x10000; + } + ((unsigned short *)(__resultDigits+__index-1))[0] = __diff; + __index += 2; + } +#endif + while (__index <= __minLen) { __diff = __borrow + __myDigits[__index-1] - __otherDigits[__index-1]; if (__diff >= 0) { @@ -3317,5 +3331,5 @@ !LargeInteger class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/LargeInteger.st,v 1.103 1999-05-19 22:16:51 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/LargeInteger.st,v 1.104 1999-05-19 22:27:15 cg Exp $' ! !