SSL Version: SNAP 20070618, 0.9.9-dev
OS Version: linux-sparc32

Title: Bad .align directives generated by perl assembly generators on Sparc

I have confirmed that the assembly files generated for Sparc result in 
bad opcodes
leading to run time illegal instructions.

Assembly files generated by crypto/bn/sparc*pl generate lines

.align 32 ;OK
.align 32,0x1000000 ; BAD
.align 16,0x1000000 ; BAD

The last two are faulty - the intention is to fill the padded space with 
nop instruction
01 00 00 00.
But the padding used is BYTE padding and hence the space is filled with
00 00 00 00, i.e, 0x1000000 is truncated to 0x00 and used as padding byte.

Solution: assembler align directive should be
.align 32 -OR-
.align 16
It is not necessary to specify the nop padding as the assembler will 
fill it in correctly
given the text .section directive.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to