Arrgh! You're right, I said SRA but meant SLR.
That's how IBM documents standard return logic in the Assembler Services Guide:
SLR 15,15 Set return code of zero
So that question remains: I wonder why they use SLR instead of SR.
-----Original Message-----
From: IBM Mainframe Assembler List <[email protected]> On Behalf
Of John Melcher
Sent: Monday, August 10, 2020 3:00 PM
To: [email protected]
Subject: Re: Clearing a register
My 360/67 functional characteristics says
XR 1.25 microsec
SR 0.65 microsec
SLR 0.65 microsec
-----Original Message-----
From: IBM Mainframe Assembler List <[email protected]> On Behalf
Of Schmitt, Michael
Sent: Monday, August 10, 2020 2:56 PM
To: [email protected]
Subject: Re: Clearing a register
*** External email: Verify sender before opening attachments or links ***
Yes, only clear low 32-bits of 64-bit registers.
I've seen method #3 in IBM code or documentation, which makes one wonder why
they used it instead of SR.
I forgot about LA Rn,0.
-----Original Message-----
From: IBM Mainframe Assembler List <[email protected]> On Behalf
Of Mike Hochee
Sent: Monday, August 10, 2020 2:50 PM
To: [email protected]
Subject: Re: Clearing a register
I tend to use XR or XGR and LLIHF or LLILF. SRA does not operate against all
32 bits, and sometimes I do not want to think about extras like sign extension
with LHI. (I know, it's not much to have to think about) I suppose if you want
compatibility with machines of 30/40 years ago you might tend towards XR and SR.
My 2 cents worth,
Mike
-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On
Behalf Of Schmitt, Michael
Sent: Monday, August 10, 2020 3:13 PM
To: [email protected]
Subject: Clearing a register
Caution! This message was sent from outside your organization.
There are many ways to set a register to binary zero. My question is, which is
the most efficient?
1. XR Rn,Rn
2. SR Rn,RN
3. SLR Rn,Rn
4. LHI Rn,0
5. Other instruction
6. Depends on hardware
7. Depends on other factors. (What?)
8. They all have equal performance
9. Method X has worse performance but other advantages. (What?)
____________________________________
Michael Schmitt |
https://clicktime.symantec.com/3MNgr55ce6EuuspodizxSyE7Vc?u=http%3A%2F%2FTOC.ASG.COM%3A8080%2F%3FdmVyPTEuMDAxJiY5NDAwZTcxY2MxYTNlOTI2Nz01RjMxQTY1Q184NzM1XzIyOTRfMSYmMTVhZDkzNzI2NzRlYzEzPTEyMzImJnVybD1EWEMlMkV0ZWNobm9sb2d5
(469) 808-4403 | [email protected]
DXC Technology Company - Headquarters: 1775 Tysons Boulevard, Tysons, Virginia
22102, USA.
DXC Technology Company -- This message is transmitted to you by or on behalf of
DXC Technology Company or one of its affiliates. It is intended exclusively for
the addressee. The substance of this message, along with any attachments, may
contain proprietary, confidential or privileged information or information that
is otherwise legally exempt from disclosure. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended recipient
of this message, you are not authorized to read, print, retain, copy or
disseminate any part of this message. If you have received this message in
error, please destroy and delete all copies and notify the sender by return
e-mail. Regardless of content, this e-mail shall not operate to bind DXC
Technology Company or any of its affiliates to any order or other contract
unless pursuant to explicit written agreement or government initiative
expressly permitting the use of e-mail for such purpose. --.