[openssl-dev] Making assembly language optimizations working on Cortex-M3

Andy Polyakov appro at openssl.org
Fri Sep 25 15:49:52 UTC 2015


>>     > and recognize two new settings,
>>     > OPENSSL_NO_ARM_NEON and OPENSSL_ARM_THUMB_ONLY, to accommodate this.
>>
>>     While NO_NEON might make sense, I really see no reason to introduce
>>     THUMB_ONLY. Because pre-defines set by the compiler driver are
>>     sufficient. 
>>
>>
>> You mean, using __thumb__ (predefined for both thumb1 and thumb2)
>> and __thumb2__ (predefined for thumb2 only)?
> 
> Yes.

http://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=11208dcfb9105e8afa37233185decefd45e89e17
made whole assembly pack Thumb2-friendly, so that now you should be able
to compile all modules. Please, double-check. There is no option to
disable NEON (yet?), because a) I want to expose it to more build cases
to catch eventual bugs; b) would like to suggest idea of supporting
Cortex-M with -march=armv6t2 -mthumb. Latter means that you'll loose
some performance, because it won't utilize word load instruction's
capability to handle misaligned access in ARMv7. But on the other hand
it won't have ideas about compiling NEON, and you'll be excused to think
about which particular Cortex-M is targeted, one will be able to cover
all with single config/buid. Can it be viable compromise? One would
still be able to tune for favorite Mx...



More information about the openssl-dev mailing list