There’s also LA/LAY which are probably as fast as the XR & SR options. Keven
On Mon, Aug 10, 2020 at 2:36 PM -0500, "Gary Weinhold" <weinh...@dkl.com> wrote: I'll make a stab at some principles behind the answer(s): Have the preceding instructions touched/changed Rn? That could affect the how long the pipeline may have to idle before changing the register. If the following instructions will check the condition code or the contents of the register, they will be delayed. However, the result in Rn can be predicted before the instruction is executed, so there may be special circuitry to bypass pipeline steps for these or following instructions. Are you interested only zeroing the 32-bit RH FW of the 64-bit registers? On 2020-08-10 3:12 p.m., Schmitt, Michael wrote: > 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. SRA Rn,Rn > 4. LHI Rn,0 > 5. Other instruction > 6. Depends on hardware > 7. Depends on other factors. (What?) > 8. They are have equal performance > 9. Method X has worse performance but other advantages. (What?) > > ____________________________________ > Michael Schmitt | DXC.technology > (469) 808-4403 | michael.schm...@dxc.com > > > 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. --. Gary Weinhold Senior Application Architect DATAKINETICS | Data Performance & Optimization Phone:+1.613.523.5500 x216 Email: weinh...@dkl.com Visit us online at www.DKL.com E-mail Notification: The information contained in this email and any attachments is confidential and may be subject to copyright or other intellectual property protection. If you are not the intended recipient, you are not authorized to use or disclose this information, and we request that you notify us by reply mail or telephone and delete the original message from your mail system.