> You cannot call a 31-bit LE program (XPLINK or non-XPLINK) from XPLINK-64 
> unless you establish a new LE environment.

FWIW in my (by definition limited) experience many (all of mine, for example) 
assembler modules are essentially non-LE. They actually run in an LE enclave, 
but they don't know that, other than the fact that they begin with EDCPRLG.

Whatever. My second bullet may be impractical. I said "possibly." I said I had 
no real experience with this. I based my second bullet on what @Don Poitras 
said: "You can call non-XPLINK non-LE 31-bit code from assembler ..."

Perhaps one could put all of one's "business logic" in a common LE-agnostic 
module and build three bridges (non-XPLINK, XPLINK and XPLINK 64) to it. My 
central points are that what @Janet is seeing is not a trivial "bug" and that 
you need to consider three environments in addressing it.

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Tom Marchant
Sent: Tuesday, August 30, 2016 8:31 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Dump in 64 bit mode "Storage around GPR2 is invalid."

On Tue, 30 Aug 2016 06:33:14 -0700, Charles Mills <charl...@mcn.org> wrote:

>@Janet, I have no personal experience with this exact problem, but from what I 
>do know and what others have written here, if you wish to market a 
>C/C++-callable API-type product in object or assembler source code form, you 
>will have to at least consider shipping not two but THREE implementations:
>
>1. Non-XPLINK (31-bit)
>2. XPLINK (31-bit)
>3. XPLINK-64
>
>Note I say "consider." You could possibly shortcut the above a little:
>
>- If the routine is not called frequently (an initialization routine, for 
>example) you could combine 1 and 2 above and use a #pragma to tell C/C++ what 
>you have done. It should not be called frequently because there is said to be 
>a significant performance penalty.
>- You might be able to solve 3 with a bridge routine rather than a full API 
>implementation, depending on the characteristics of the function. The bridge 
>routine would have to set up the proper linkage including a save area below 
>the bar, copy any above-the-bar parameters below the bar, issue SAM31, and 
>call either 1 or 2. On return it would have to issue SAM64, unwind the 
>linkage, and return.

You cannot call a 31-bit LE program (XPLINK or non-XPLINK) from XPLINK-64 
unless you establish a new LE environment. I've never done it, but I think that 
it means establishing a new LE enclave and tearing it down when you are 
finished. You could potentially implement your API as a non-LE 31-bit program 
and include additional stub modules to call it.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to