Phil Smith III wrote:
We have a largish batch LE C application that runs in POSIX mode. For 
performance optimization, we're rewriting a couple of routines in assembler. So 
far so good.

Here's the kicker: the application is 31-bit, but needs to use 64-bit registers 
(for large integer math). We're having a devil of a time grokking what the 
linkage conventions should be.

We found the Assembler Services Guide where they detail the prolog and epilog 
code for a 31-bit program calling a 31-bit program that will save off and 
restore the high order bytes of the general registers (using IHASAVER). But we 
can't seem to find how that interrelates with the CEEENTRY macro that seems to 
be required when calling from LE C to assembler (or is it required?).


Absolutely no need to use CEEENTRY or any LE macros in your assembler code unless you want to call LE services. The only requirement is that your routines should have standard "OS" linkage. Passing a "long long" to your subroutines is no different than calling it from assembler.

BTW, I'm interested to know what your subroutines do to "optimize". I've never had a reason to call assembler from C to optimize other than I/O functions.


Can anyone offer a pointer to how to do this the "right" way? We can just do STMG into a 
local savearea, but it won't be "right" from LE's perspective. We've already convinced 
ourselves that LE gets angry if we don't restore the top 32 bits properly.

Do not anger the LE, for its wrath is not pretty!

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to