I've been compiling OpenSSL on a Windows machine using the default "nt.mak".
OpenSSL 0.9.7e compiled fine this way, but I'm having trouble with 0.9.7f:

        nasmw -f win32 -o crypto\rc4\asm\r4_win32.obj
.\crypto\rc4\asm\r4_win32.asm
.\crypto\rc4\asm\r4_win32.asm:30: error: operation size not specified
.\crypto\rc4\asm\r4_win32.asm:265: error: operation size not specified
.\crypto\rc4\asm\r4_win32.asm:267: error: operation size not specified
.\crypto\rc4\asm\r4_win32.asm:271: error: operation size not specified
NMAKE : fatal error U1077: 'nasmw' : return code '0x1'
Stop.

When I use the previous version of /crypto/rc4/asm/rc4-586.pl, it compiles
fine.  This was obviously triggered by the changes seen here:
http://cvs.openssl.org/filediff?f=openssl/crypto/rc4/asm/rc4-586.pl&v1=1.1.1
.1&v2=1.1.1.1.12.1.

I've included excerpts of the diff that show which parts of the script are
generating the compile errors.

Thanks in advance.

Matthias Miller

--------------------------------------------------------------------

        &stack_push(3); # 3 temp variables
         &add(  $d,     8);
-       &and(   $x,             0xff);
+
+       # detect compressed schedule, see commentary section in
rc4_skey.c...
+       # in 0.9.7 context ~50 bytes below RC4_CHAR label remain redundant,
+       # as compressed key schedule is set up in 0.9.8 and later.
+       &cmp(&DWP(256,$d),-1);
+       &je(&label("RC4_CHAR"));
 
         &lea(  $ty,    &DWP(-8,$ty,$in));

...

        &RC4_loop(5,0,1);
        &RC4_loop(6,1,1);
 
+       &jmp(&label("finished"));
+
+       &align(16);
+       # this is essentially Intel P4 specific codepath, see rc4_skey.c,
+       # and is engaged in 0.9.8 and later context...
+       &set_label("RC4_CHAR");
+
+       &lea    ($ty,&DWP(0,$in,$ty));
+       &mov    (&swtmp(2),$ty);
+
+       # strangely enough unrolled loop performs over 20% slower...
+       &set_label("RC4_CHAR_loop");
+               &movz   ($tx,&BP(0,$d,$x));
+               &add    (&LB($y),&LB($tx));
+               &movz   ($ty,&BP(0,$d,$y));
+               &movb   (&BP(0,$d,$y),&LB($tx));
+               &movb   (&BP(0,$d,$x),&LB($ty));
+               &add    (&LB($ty),&LB($tx));
+               &movz   ($ty,&BP(0,$d,$ty));
+               &xorb   (&LB($ty),&BP(0,$in));
+               &movb   (&BP(0,$out),&LB($ty));
+               &inc    (&LB($x));
+               &inc    ($in);
+               &inc    ($out);
+               &cmp    ($in,&swtmp(2));
+       &jb     (&label("RC4_CHAR_loop"));
+
        &set_label("finished");
        &dec(   $x);
         &stack_pop(3);

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to