> Personally, I think there are few cases where Thumb2 makes sense, and > I would be perfectly happy for all the ARM .asm code to assemble to > ARM code only. What I do think is that we could refine the logic > around interworking returns based on those #defines instead of on the > ARCH, i.e., when lr is on the stack, we could do sth like > > #if !defined(__thumb__) || defined(__thumb2__) > /* we are not being called by thumb-1 code */ > ldmia sp!, {..., pc} > #else > /* do interworking return compatible with ARMv4T */ > ldmia sp!, {..., lr} > bx lr > #endif > > Note that this only works if the .asm function are only called > internally, but I think that is the case.
Correct, it's possible to simplify interworking return logic. If we make certain assumptions. And it's arguably safe to make these assumptions, because code is distributed in source form and if integrated to another project, it will share compiler flags with the rest of the project. I mean current interworking approach implies most rigid circumstances up to distributing in binary form, but it's not really interesting to anybody. However, I'd like to handle this later as separate commit, separate from one that will address the inconsistency in ARM support we are talking about. As for simplified logic I plan to extent current #if and settle for #if __ARM_ARCH__>=5 || !defined(__thumb__) ldmia sp!,{...,pc} #else ldmia sp!,{...,lr} bx lr #endif ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org