On Thu, 27 Jan 2022 14:41:31 +0000, Seymour J Metz <sme...@gmu.edu> wrote:
>Please reread what you wrote and my response. A program that expects a 72-byte >save area and that needs to preserve ARs or grande registers is expected to >stor F5SA or F8SA at offset 4 of the save area that it obtains, not the >address of the previous save area, I don't think I said that a program that uses F5SA or F8SA saves the address of the previous save area at offset 4 of its save area. If I did, that is incorrect, and I apologize. What I did say is "A program that saves its caller's registers in standard 72-byte format is expected to set offset 4 of the save area that it obtains to the address of the previous save area, regardless of the size of save area that it provides." While a program that uses F5SA or F8SA format uses the caller provided 72-byte area in a way that is indistinguishable from standard 72-byte format when looked at by itself, it does not use standard 72-byte format. It uses F5SA or F8SA format and places that value in the second word. And F8SA was not intended for a program that needs to save its caller's access registers. It was designed for a program that calls other programs that require a 216-byte save area to store the 64-bit GPRs , the Access Registers, and the ASC mode in F7SA format. Tom Marchant >-- >Shmuel (Seymour J.) Metz >http://mason.gmu.edu/~smetz3 > >________________________________________ >From: IBM Mainframe Assembler List [ASSEMBLER-LIST@LISTSERV.UGA.EDU] on behalf >of Tom Marchant [000000a69b48f3bb-dmarc-requ...@listserv.uga.edu] >Sent: Thursday, January 27, 2022 9:17 AM >To: ASSEMBLER-LIST@LISTSERV.UGA.EDU >Subject: Re: Saving Caller's 64-bit Registers (was "...Regsiters") > >On Thu, 27 Jan 2022 02:57:11 +0000, Seymour J Metz <sme...@gmu.edu> wrote: > >>> No. A program that saves its caller's registers is F4SA format is expected >>> to set >>> offset 4 of the save area that they obtain to "F4SA", regardless of the >>> size of the >>> save area that it obtains for the programs that it calls. >> >>I was asking about the calling program, not the called program. > >Every calling program is also a called program. It sets the second word >according to the way it saved its caller's registers, not the size of the save >area that it provides to programs that it calls. >> >>> A program that saves its caller's registers in standard 72-byte format >>> is expected to set offset 4 of the save area that it obtains to the address >>> of the previous save area, regardless of the size of save area that it >>> provides. >> >>That's not what the manual says. A program that saves the callers registers >>in a 72-byte save area and alters ARs or the top halve of GRs is expected to >>save them in a new F5SA or F8SA. > >Read it again, Shmuel. A program that uses F5SA or F8SA format saves the low >halves in the 72-byte save area provided, and allocates a 216 byte (for F5SA) >or 288 byte (for F8SA) save area for the programs it calls to use, and saves >the high halves in that save area. Such a program is not using "standard >72-byte format", but F5SA or F8SA. > >The caller's Access Registers are not stored in the F8SA. Rather, the 216 >bytes before the high halves can be used by a program that it calls to save >the registers in F7SA format. If you want to also save your callers ARs, you >can save them after the 288 bytes, but there is no defined format for that. > >Tom Marchant