Peter,

"You keep saying that "The main important thing, as has been mentioned so many times, is that the provider of the save area provides space."

One of the outstanding questions that you keep 'going around' is:
"Can the called program (sometimes) know how much area was provided?"

The answer seems to be that, while not fully known, if one of the literals is present, the called program can safely know that they have at least the x'08' to x'7F' are to start double-word registers. Do you at least agree to that conclusion?

The next question is: "Can the called program determine other areas (in the provided save area) that he is safe to use based on the literal set at x'04' by the caller?" (Assuming that the literal is present.)

Tony Thigpen

Peter Relson wrote on 1/27/22 8:55 AM:
Shmuel wrote
For running forward, it's a bit stickier. Is a program providing a
144 byte save area expected to format it as FxSA?

As I wrote previously, you cannot in general "run forward". You could if
you know exactly what the target programs are doing (which is unlikely
unless you own them). There is no expectation. There is no concept of the
provider "formatting it". The provider "provides it". The target "uses
it".

It is not in general knowable how the target chose to "use it". The target
could be a routine that expects 72 bytes and uses the first 72 bytes only
(including putting the next address at +8). It could be a routine that
expects 144 bytes in which case it would likely use it according to the
conventions (incuding putting the next address at +x'88')..

Shmuel wrote
<snip>
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
</snip>

There is no conflict. The manual section referred to is not what Tom was
referring to. A program that "saves its caller's registers in standard
72-byte format" is not one that (also) saves ARs and/or high halves. That
would be a program that "saves its caller's low halves in standard 72-byte
format and also saves ARs and/or high halves".
And, yes, such a program would (if following the conventions) be using
F5SA/F8SA.

The main important thing, as has been mentioned so many times, is that the
provider of the save area provides space. The provider does not dictate
how that space is to be used. The conventions are such that the uses do
not conflict with respect to being able to locate the previous pointer. A
general routine to format save areas does so. It looks at the value at +4
to decide if that is the previous pointer or if the previous pointer is at
+x'88'.

Peter Relson
z/OS Core Technology Design

Reply via email to