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

Reply via email to