One way to find out whether you need those save is to use a linkage that doesn't save them and get a call at 0 dark hundred when things blow up. Unless you know that you don't need to save them, play safe. IMHO.
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Assembler List <ASSEMBLER-LIST@listserv.uga.edu> on behalf of Dan Greiner <dan_grei...@att.net> Sent: Monday, May 28, 2018 7:49 PM To: ASSEMBLER-LIST@listserv.uga.edu Subject: Re: BAKR Instruction Mr. Relson's warnings on the performance of BAKR/PR warrant some additional comment. 1. A well-tuned subroutine call can limit the number of registers that are saved/restored. BAKR/PR saves/restores all 16 general-purpose registers, and it always saves all 64-bits of the register, even if the program is operating in the 24- or 31-bit addressing mode. Most likely, this will not be observable, but if you're doing it a gazillion times a second, your mileage may vary. 2. BAKR/PR saves the 16 access registers, regardless of whether the program is operating in the AR mode. 3. BAKR/PR saves the program-key mask (PKM), secondary address-space number (SASN), extended-authorization index (EAX), and primary address-space number (PASN), regardless of whether the program gives a hoot about cross-memory operation. If the ASN-and-LX-reuse facility is installed, the primary and secondary-ASTE-instance numbers are also saved/restored. Unless you specifically need these features of BAKR, you might want to look elsewhere. Unlike other program-stack models (e.g., Unix & Linux) where the program can easily (and, perhaps, maliciously) manipulate the contents of the stack, the linkage stack is semi-hidden from the program. Selected portions of the most-recently-created stack entry can be extracted, and a doubleword modifiable area can be modified via ESTA and MSTA, respectively. But this ain't your classic C programming model.