No, you are not safe in assuming that a STM R14,R12,12(R13) is sufficient, 
although it is necessary. You still need to save and restore the top halves of 
any non-volatile general registers if you alter bits 0-31. It is, of course, 
safe to save them in a nonstandard manner.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Assembler List [ASSEMBLER-LIST@LISTSERV.UGA.EDU] on behalf 
of Charles Mills [charl...@mcn.org]
Sent: Friday, January 21, 2022 12:02 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Saving Caller's 64-bit Regsiters

Once upon a time there were only 32-bit registers and 72-byte save areas.
Some documentation was written during that time. It would have made no sense
for it to say "we provide a 72-byte save area" because the obvious retort
would be "of course you do." Some documentation has not been updated since.

So I think it is relatively* safe to assume that any standard-ish z/OS
program from before 2000 or so that provides an otherwise undocumented save
area provides a 72-byte save area, and by implication does not know or care
about the high halves of registers. It would appear that Rexx would fall
into that category.

Therefore you are relatively* safe in assuming that a STM R14,R12,12(R13) is
sufficient.

*If you wanted to be totally prudent simply save the high halves of any
register(s) where you use the high half/ves in some private non-standard
save area of your own. For a tiny assembler routine such as you describe,
that private save area might be the low half of some otherwise unused
register.

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU]
On Behalf Of Dave Clark
Sent: Friday, January 21, 2022 6:32 AM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Saving Caller's 64-bit Regsiters

"IBM Mainframe Assembler List" <ASSEMBLER-LIST@LISTSERV.UGA.EDU> wrote on
01/21/2022 09:16:30 AM:
> Dave Clark wrote
> <snip>
> is there
> some other means of knowing whether or not to save the high halves in
the
> caller's save area?
> </snip>
>
> This has been covered many times. It's your interface. If you documented

> that they should provide a save area suitable for saving high halves in
> that area then you assume that they have met the interface requirements.

> If they didn't (especially with respect to save area), bad things will
> happen. It's no different than if you required a 72-byte save area and
> they gave you a shorter one.


        Yes, I'm fully aware of all that.  However, my program is being
called by REXX and I'm not aware of any documentation stating what kind of
register save area REXX provides.  That is why I asked and was wondering
if there is, perhaps, a code in the first word of the save area that
indicated the format used -- and, in the absences of such a code, the
72-byte savearea is all there is.

Reply via email to