> The SHA-1 implementation uses the bswap instruction, which is not
> available on the i386. (I consider it a bug if an operating system
> doesn't catch the exception and emulate bswap, but apparently OS
> authors don't buy into the "slow and working" philosophy.) SHA-1 is
> considerably slower with the swap done stepwise, so we do that only
> when OpenSSL is built on a 386 or the user explicitly requests it.
Okay, that makes it clearer for me.
In this case, I would just lift the processor identification code out
of something like FreeBSD and use it during initialization to set up a
dispatch table for CPU-specific functions. The ident code probably
won't run out-of-the-box in user mode, but I recall a few years back
someone mentioning a user-space Intel CPU identifier function written to
solve this exact problem in another application.
You would then build the two versions of the routine (always) and
switch between them at runtime.
--lyndon
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]