> 1. I was under impression that AIX and Linux use different calling > convention (stack frame and stuff). Am I wrong? I wonder because code > in > AIX and Linux modules appears essentially identical. Well, leaf > functions can be identical, as they don't have to allocate a stack > frame, but bn_div_words made me suspicious...
Made some googling around... As far as I can see at least PPC32 architectures do use different ABIs. Linux PPC64 on the other hand "follows AIX and uses PowerOpen ABI." In either case. Even though 32-bit ABIs are rather similar, formally they can't be intermixed. Most notably AIX ABI reserves for a slack space/red zone on top(*) of the stack, which application can use as persistent storage, in other words you can dereference -X(SP), where X is less than certain value. ABI used by PPC32 Linux claims that stack pointer is so to say accurate and storage above(*) it is volatile [as it can be used by asynchronous signal handlers and alike], meaning that referencing to -X(SP) formally is not appropriate. (*) I'm "higher addresses downward" person. > 2. If code is essentially identical, why two separate modules? Why not > let pre-processor take care of OS specifics and keep the same code > base? I reckon that it's perfectly possible to have same modules and I think we should do that. Yes, even for PPC32 modules. As already mentioned ABIs are very similar and I see no problem covering PPC32 ABI differences with pre-processor directives. A. ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]