From: Linus Torvalds Date: Thu, 06 Aug 2009 02:10:18 GMT Subject: Re: x86 SHA1: Faster than OpenSSL Message-ID: In-Reply-To: <7vocqtu286.fsf@alter.siamese.dyndns.org> On Wed, 5 Aug 2009, Junio C Hamano wrote: > > Like this? No, combine it with the other shifts: Yes: > - ctx->size += (unsigned long long) len << 3; > + ctx->size += (unsigned long long) len; No: > + ctx->size <<= 3; /* bytes to bits */ > padlen[0] = htonl(ctx->size >> 32); > padlen[1] = htonl(ctx->size); Do padlen[0] = htonl(ctx->size >> 29); padlen[1] = htonl(ctx->size << 3); instead. Or whatever. Linus