LLILF and C?

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Mark Hammack
Sent: Monday, November 29, 2021 2:52 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Base-less macros

So an interesting dilemma:

I have a macro that switches between a regular (24/31 bit style) save area
and an extended (64 bit "F4SA") save area.  Before saving the registers, I
am checking whether the current save area is old (24/31 bit) or new (64
bit) save area.  The original code used CLC  =C'F4SA',4(R13) to check
(since it is all our code, I don't need to worry about the other 64 bit
save area formats).  However, that implies a literal pool within 4k of the
subroutine entry point (R15 at this point).  I could add a 4 byte literal
to the macro and then branch around it.  The other option I thought of
which removes the necessity of a base register is to use CLHHSI
4(R13),C'F4'/JNE .../CLHHSI 6(R13),C'SA'/JNE ...  However, this is
confusing and since there are multiple points in the macro where I need the
F4SA literal, I'll probably go with door number one.

If only there were 20 bit displacement options for CLC and MVC...(LRL,
LARL, LAY, etc. have come in handy for reducing the number of LTORGS in the
programs, especially for =A(address) type literals).



*Mark*


On Mon, Nov 29, 2021 at 4:06 PM Seymour J Metz <sme...@gmu.edu> wrote:

> "When control is returned to your control section from the called control
> section, registers 2-14 contain the same information they contained when
> control was passed, as long as system conventions are followed."
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> ________________________________________
> From: IBM Mainframe Assembler List [ASSEMBLER-LIST@LISTSERV.UGA.EDU] on
> behalf of Ngan, Robert (DXC Luxoft) [robert.n...@dxc.com]
> Sent: Monday, November 29, 2021 3:57 PM
> To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
> Subject: Re: Base-less macros
>
> The assembler services guide doesn't specify what is in (bottom half of)
> R14 upon return.
> Also, on return to an AMODE(64) routine via BASSM/BSM, R14 would have the
> low-order bit set.
>
> Robert
>
> -----Original Message-----
> From: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> On
> Behalf Of Paul Gilmartin
> Sent: Monday, November 29, 2021 14:01
> To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
> Subject: Re: Base-less macros
>
> On Nov 29, 2021, at 12:41:51, Ngan, Robert (DXC Luxoft) wrote:
> >
> > DON'T DO THAT!
> > I had to find/redo all our code that did this when our subroutine
> return logic was changed to use a BIC instruction.
> >
> Which of you violated standard linkage conventions?
>
> My understanding is that R14 is expected to point to the instruction after
> the CALL; R15 to the ENTRY point.  Either may be changed by an embedded
> CALL and should be treated as volatile.  RETURN should use LM to retrieve
> the value of R14, etc.
>
>
> > -----Original Message-----
> > From: Steve Smith
> > Sent: Thursday, November 25, 2021 13:49
> >
> > My suggestion of using R14 for the base was because it's already set by
> the call to the subroutine.
>
> -- gil
>

Reply via email to