This is a discussion on Re: [openssl.org #1547] [BUG] Bad use of .align directive in Sparc assembly code - Openssl ; > SSL Version: SNAP 20070618, 0.9.9-dev > OS Version: linux-sparc32 >=20 > Title: Bad .align directives generated by perl assembly generators on S= parc The title is too generalized to be correct. It should read "Bad .align=20 directives on SPARC ...
> SSL Version: SNAP 20070618, 0.9.9-dev
> OS Version: linux-sparc32
> Title: Bad .align directives generated by perl assembly generators on S=
The title is too generalized to be correct. It should read "Bad .align=20
directives on SPARC *Linux*" or perhaps "... GNU assembler."
> I have confirmed that the assembly files generated for Sparc result in=20
> 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 wit=
> 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 by=
> Solution: assembler align directive should be
> .align 32 -OR-
> .align 16
> It is not necessary to specify the nop padding as the assembler will=20
> fill it in correctly
> given the text .section directive.
The fact is that without 0x1000000 Solaris[!] assembler pads with=20
*zeros*, which trap as invalid instruction at run-time. In other words,=20
suggested solution is not appropriate for Solaris and the problem has to=20
be solved in another way: http://cvs.openssl.org/chngview?cn=3D16290. A.
OpenSSL Project http://www.openssl.org
Development Mailing List email@example.com
Automated List Manager firstname.lastname@example.org