With the following patch OpenSSL can be used on the 386 processor.
I am not sure how it should be integrated in OpenSSL. The patch makes
SHA-1 roughly 10% slower on a Pentium.
I suspect that for most people performance on modern processors is
more important. On the other hand, I don't want my software to dump
core on 386 processors.
Comments?
--- x86unix.pl Tue Mar 23 17:41:19 1999
+++ 386unix.pl Tue Mar 23 17:41:19 1999
@@ -1,11 +1,5 @@
#!/usr/local/bin/perl
-# Because the bswapl instruction is not supported for old assembers
-# (it was a new instruction for the 486), I've added .byte xxxx code
-# to put it in.
-# eric 24-Apr-1998
-#
-
package x86unix;
$label="L000";
@@ -158,7 +152,8 @@
sub main'inc { &out1("incl",@_); }
sub main'push { &out1("pushl",@_); $stack+=4; }
sub main'pop { &out1("popl",@_); $stack-=4; }
-sub main'bswap { &out1("bswapl",@_); }
+#sub main'bswap { &out1("bswapl",@_); }
+sub main'bswap { &main'comment("bswapl @_"); &main'exch(main'HB(@_),main'LB(@_));
+&main'rotr(@_,16); &main'exch(main'HB(@_),main'LB(@_));}
sub main'not { &out1("notl",@_); }
sub main'call { &out1("call",$under.$_[0]); }
sub main'ret { &out0("ret"); }
@@ -201,7 +196,6 @@
{
local($name,$p1)=@_;
local($l,$t);
- local(%special)=("bswapl",0x0FC8);
if ((defined($special{$name})) && defined($regs{$p1}))
{
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]