I wouldn't change it to a single MVC.  I've noticed that the XLC optimizing
compiler does the same thing (MVI with overlapping MVC) for memset(), and I
am confident that they know what is fastest.  Looking at optimized code from
IBM's compilers is IMO the best place to see how to make the hardware go the
fastest... the public documentation doesn't nearly tell you the whole
story.   For the XLC/C++ compiler, you can specify target architecture
levels, so you can even pick up clues as to what changes are important.

You should see what the XLC compiler does instead of a MVCL :-)

Kirk Wolf
Dovetailed Technologies

On Fri, Aug 7, 2009 at 4:31 PM, Bill Fairchild <[email protected]> wrote:

> It certainly can't hurt to change the MVI/MVC to a single instruction:
>     MVC   254(3,120),=120c' '
> And, if possible, align the 120c' ' on at least a double word boundary.
>
> Bill Fairchild
>
> Software Developer
> Rocket Software
> 275 Grove Street * Newton, MA 02466-2272 * USA
> Tel: +1.617.614.4503 * Mobile: +1.508.341.1715
> Email: [email protected]
> Web: www.rocketsoftware.com
>
> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[email protected]] On
> Behalf Of Farley, Peter x23353
> Sent: Friday, August 07, 2009 2:50 PM
> To: [email protected]
> Subject: z10 and overlapping/destructive moves
>
> I am in the midst of a CPU optimization exercise for a COBOL program and
> ran across the following code sequence generated by the compiler:
>
>   MVI   254(3),X'40'
>   MVC   255(119,3),254(3)
> This code is generated in response to a simple COBOL "MOVE SPACES TO
> variable" instruction, where the variable is 120 bytes long.
>
> Did I or did I not see some discussion here or perhaps in a SHARE
> presentation that on a z10 machine overlapping/destructive moves wreck
> the pipeline and take *much* longer to execute as a result?  Or am I
> imagining that?
>
> The reason I ask is that Strobe highlights this place in the code as a
> high-usage point, and I am struggling to understand why.
>
> TIA for any info you can provide.
>
> Peter
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to