In that scenario, offset 4 of Xs save area will no longer contain FnSA, and can 
thus be identified as the forward pointer of a 72-byte save area.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Assembler List [ASSEMBLER-LIST@LISTSERV.UGA.EDU] on behalf 
of Mark Boonie [boo...@us.ibm.com]
Sent: Wednesday, December 1, 2021 2:09 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Base-less macros

> The one case where there could be an issue is if the
> routine calls both code expecting a 72-byte save area and code
> calling a 144-byte area.
>
> If the linkage conventions are followed, under what circumstances
> would you be unable to follow the forward chain with a little bit of
work?

Didn't you just identify the circumstances?

Suppose routine X calls both routine Y and routine Z with a 144-byte save
area:

- Routine X calls routine Y which is going to use the high-order halves of
some registers.  Routine Y updates routine X's save area with the saved
64-bit registers and a pointer to routine Y's new save area in location
136.
- Routine Y returns to routine X.
- Routine X calls routine Z which is only going to use the low-order
halves of the registers.  Routine Z updates routine X's save area with the
saved 32-bit registers and a pointer to routine Z's new save area in word
2.

Before routine Z returns, the save area for routine X (the one pointed
pointed to by the backward pointer from Z's current save area) has two
forward pointers:  one to the no longer valid save area for routine Y, and
one to the valid save area for routine Z.  Scanning forward doesn't allow
you to tell which one is correct.

Unless by "linkage conventions" you mean calling a routine with a save
area that is only as large as that which is required, so that X would need
two different save areas for calling Y and Z?

- mb

Reply via email to