For those of you who really wonder what the heck was the problem with
IRIX. There were two distinct problems.
1. crypto/bn/bn_lib.c:BN_[set|clear]_bit(). In order to reach 64 bit
registers BN_ULONG on IRIX n32 is defined as 'unsigned long long'. The
functions in question contained 1L<<j expressions, where j varies from 0
to 63. MIPS implements two different shift instructions, one that shifts
32 bit lower part and one that works on 64 bit registers. In N32 model
1L is a 32 bit wide constant and compiler natirally hired the first
instruction. Now the catch is that this instruction (i.e. 32 bit shift)
performs shift by j%32. I suppose you've already figured out that when j
happened to be e.g. 33 the result of 1L<<j was 2 instead of expected
0x200000000.
2. crypto/rsa/rsa_oaep_test.c. Problem was caused by bug/flaw in the
compiler. MIPSpro C seem to pad automatic character constants with zeros
after it hits first '\0' in the literal. Here is a test program
demonstrating the flaw:
main ()
{ static char ss[] = "\0\01";
char as[] = "\0\01";
printf ("auto: %d %d\n",sizeof(as),as[sizeof(as)-2]);
printf ("static: %d %d\n",sizeof(ss),ss[sizeof(ss)-2]);
}
When compiled with MIPSpro C program produces "auto: 3 0, static: 3 1."
While when compiled on Sun - "auto: 3 1, static: 3 1."
Cheers. Andy.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]