And there is also another old-time technique - callee returns to R14+0 or R14+4 or R14+8 or . . . for different exit conditions. Haven't seen that one is a while, but it used to be reasonably common.
Although it didn't actually require changing R14, (B 4(,R14) to return to call-point + 4, for instance), some code did change R14 to accomplish that effect. BTDT (Been There, Debugged That . . . but no t-shirts). Peter -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Charles Mills Sent: Monday, June 13, 2016 6:26 PM To: [email protected] Subject: Re: LINK and high order word of R1 Makes sense. It does seem to me that I have seen code -- kids, don't try this at home -- that used R14 as a temporary base register on return from a call. You know, back in the pre-branch-relative days when you could be desperate for a base register. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Tom Marchant Sent: Monday, June 13, 2016 2:37 PM To: [email protected] Subject: Re: LINK and high order word of R1 On Mon, 13 Jun 2016 16:14:25 -0500, Tom Marchant wrote: >It seems to me that the low half of 14 should be unchanged as well, but that's >not what the book says. Looking over my correspondence with Peter when he was rewriting Chapter 2, I asked about the low half of R14. He replied, quite correctly, that a caller can't rely on R14 being unchanged upon return from a call, since the call itself changes it. ---------------------------------------------------------------------- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
