> > As implied in RT#410 closing note it smells like a compiler bug. > > changing optimization level from +O3 to +O2 in the hpux-parisc2-cc target > seems to fix the BN_kronecker test problem with the no-asm option.
Meaning that it *is* in fact a compiler bug and is therefore not an OpenSSL issue. Well, there were multiple occasions when OpenSSL code was modified to compensate for compiler bugs, but only if the bug appeared at all optimization levels or *significantly* affected the performance. In this case I reckon that +O2 should provide decent performance, not to mention that there is a working assembler replacement (at least it works when linked statically, right?). So we dismiss this part of the report. > > > 3) shared library linking fails with hpux-parisc2-cc target. > > > > 'cd ./crypto/bn; rm asm/pa-risc2.o; make -n'. What is the command line > > issued to compile asm/pa-risc2.o? > > cc -c -I.. -I../.. -I../../include +Z -DOPENSSL_THREADS -D_REENTRANT -DDSO_DL >-DOPENSSL_NO_KRB5 -DOPENSSL_NO_IDEA +DA2.0 +DS2.0 +O3 +Optrs_strongly_typed >+Olibcalls -Ae +ESlit -DB_ENDIAN -DMD32_XARRAY -o asm/pa-risc2.o asm/pa-risc2.s My knowledge of PA-RISC assembler is rather limited, but if I compare pa-risc.s and pa-risc2.s, I see that reference to "Division would overflow" is treated completely different. And I can actually imagine that the way it's treated in pa-risc2.s is not positon-independent... Given that that code is actually never called (it's an assertion mostly for debugging purposes) it's perfectly possible to get rid of at least call to fprintf. In other words try following patch. Note that I can't actually verify it, so that if it doesn't work, you're expected to make an effort to make it work:-) Most notably I might have deleted two much at the end... Cheers. A. *** ./crypto/bn/asm/pa-risc2.s.orig Wed Sep 27 15:54:28 2000 --- ./crypto/bn/asm/pa-risc2.s Thu Jan 2 17:22:55 2003 *************** *** 747,754 **** .PROC .EXPORT bn_div_words,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR,LONG_RETURN .IMPORT BN_num_bits_word,CODE - .IMPORT __iob,DATA - .IMPORT fprintf,CODE .IMPORT abort,CODE .IMPORT $$div2U,MILLICODE .CALLINFO CALLER,FRAME=144,ENTRY_GR=%r9,SAVE_RP,ARGS_SAVED,ORDERING_AWARE --- 747,752 ---- *************** *** 844,855 **** MOVIB,TR 2,%r8,$0006001C ;offset 0xa18 EXTRD,U %r3,63,32,%r7 ;offset 0xa1c $D2 - ADDIL LR'__iob-$global$,%r27,%r1 ;offset 0xa20 - LDIL LR'C$7,%r21 ;offset 0xa24 - LDO RR'__iob-$global$+32(%r1),%r26 ;offset 0xa28 - .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,RTNVAL=GR ;in=24,25,26;out=28; - B,L fprintf,%r2 ;offset 0xa2c - LDO RR'C$7(%r21),%r25 ;offset 0xa30 .CALL ; B,L abort,%r2 ;offset 0xa34 NOP ;offset 0xa38 --- 842,847 ---- *************** *** 1605,1618 **** .PROCEND - .SPACE $TEXT$ - .SUBSPA $CODE$ - .SPACE $PRIVATE$,SORT=16 - .IMPORT $global$,DATA - .SPACE $TEXT$ - .SUBSPA $CODE$ - .SUBSPA $LIT$,ACCESS=0x2c - C$7 - .ALIGN 8 - .STRINGZ "Division would overflow (%d)\n" .END ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]