Discussion:
ATTACH EXTR=3D3Dexit and saving registers (save _all_ registers?)
(too old to reply)
Peter Relson
2017-08-30 13:14:55 UTC
Permalink
Raw Message
<snip>
If I didn't have to save/restore R15 and R1, then I could totally get away
with something very close to standard linkage
</snip>

Huh? You can precisely use standard linkage. Standard linkage starts with
"save all". It does not require "restore all".

If a service (or protocol) does not specifically tell you to preserve
registers 15,0,1 then you do not to do so.

As Tom Marchant mentioned, not saving all is simply short-sighted, since
you might need that information for diagnostics.

Using BAKR/PR to save/restore is an easy way to avoid this problem.

The other part that goes with Ed Jaffe's astonishment about problem state,
is that the ETXR is also entered in TCB key (even if the ATTACH was issued
in some other key).
If Ed's astonishment results from a recent event, that indicates that he
has not previously had much need for doing supervisor state stuff in
ETXR's.

z/OS (AKA OS/390 AKA MVS) presumably decided not to create a dependency
for normal users with respect to how ETXR's work.
Is it an IRB? Yes. Must it be an IRB? Not in theory. Maybe in practice
now, due to compatibility concerns, it must be.
Can you get away with saving nothing and just branching back to the
address in reg 14? Today, yes. Maybe forever, yes. But that would be a
silly thing to code to.

Peter Relson
z/OS Core Technology Design


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Thomas David Rivers
2017-08-30 20:15:27 UTC
Permalink
Raw Message
Post by Peter Relson
<snip>
If I didn't have to save/restore R15 and R1, then I could totally get away
with something very close to standard linkage
</snip>
Huh? You can precisely use standard linkage. Standard linkage starts with
"save all". It does not require "restore all".
If a service (or protocol) does not specifically tell you to preserve
registers 15,0,1 then you do not to do so.
Thanks Peter!

My concern was the words "Unless otherwise defined by the individual
interface"
in the z/OS MVS Programming Assembler Services Guide where it describes the
standard linkage; and how that meshes with this text in the ETXD option
description
ATTACH and ATTACHX in the z/OS MVS Program: Authorized Assembler
Services Reference:

"The exit routine is responsible for saving and restoring the registers".

That would seem to indicate that the ETXR is responsible for saving
_and_ restoring?
Or, is it open to interpretation? If it's open to interpretation - just
what should that
interpretation be? Does "the registers" mean "all the registers" or
just the standard ones?
Does this sentence fall under the "Unless otherwise defined by the
individual interface"
clause, or is it simply a reminder to follow standard saving/restoring
practices?

Some simple specification or improved wording in the doc might be a good
idea... it seems unclear to me...


- Thanks -
- Dave Rivers -
--
***@dignus.com Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com
Loading...