This problem is complex in theory but simple in (your) practice.

Save/restore the lower halves with an STM/LM R14,R12,12(R13) on entry/exit.

Save and restore the upper half of any register you destroy using a save
area of your choice. The lower half of an otherwise unused register is good.
A fullword in GETMAIN storage is good. AR 0 is good. 

QED

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU]
On Behalf Of Dave Clark
Sent: Monday, January 24, 2022 11:15 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/24/2022 02:01:29 PM:
> When I'm following save area chains in a dump, starting with R13, I look 

> at the second word. If it is an address, I know that the save area at 
that 
> address is a standard 72-byte save area. If it is F4SA, F5SA, F7SA, or 
F8SA, 
> offset X'80' from R13 is the address of the save area, and I know what 
> format it is. 


        That is all well and good -- when you're looking at a dump.  But 
I'm given to understand that none of that information is helpful when a 
called program receives control from a 2nd- or 3rd-party caller (i.e., any 
caller not written on-site) in terms of being able to tell how much 
storage the caller allocated for the savearea whose address is passed to 
the called program.  Now, if I've got that wrong, then please enlighten 
me.  Thanks.


Sincerely,

Dave Clark
-- 
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300

Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio  45439  USA
(937) 294-5331




****************************************************************************
*****************
This email message and any attachments is for use only by the named 
addressee(s) and may contain confidential, privileged and/or proprietary 
information. If you have received this message in error, please 
immediately notify the sender and delete and destroy the message and all 
copies. All unauthorized direct or indirect use or disclosure of this 
message is strictly prohibited. No right to confidentiality or privilege 
is waived or lost by any error in transmission. 
****************************************************************************
*****************

Reply via email to