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?).

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!

You don't need LE to use 64-bit integer arithmetic. Just use
standard linkage conventions between C and Assembler. You can
run in 31-bit mode and use 64-bit arithmetic no problem.


--

Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

* To get a good Return on your Investment, first make an investment!
  + Training your people is an excellent investment

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

Reply via email to