On 1/06/2011 12:13 AM, Kirk Wolf wrote:
The IBM C compiler would generate an MVC loop. So, that's how IBM feels I
guess.
And when the length is a constant it generates multiple MVC instructions
to eliminate branches. Kind of like
loop unrolling.
*
* char input[528];
*
* memcpy( output, input, sizeof input );
MVC (*)void(256,r1,0),input(r4,1508)
MVC (*)void(256,r1,256),input(r4,1764)
MVC (*)void(16,r1,512),input(r4,2020)
And if you increase the size of the buffer it generates a loop with loop
unrolling (if that makes sense). There
seems to be a HWM where it drops into a loop.
*
* char input[10000];
*
* memcpy( output, input, sizeof input );
LA r0,5
LA r6,2176(r4,)
@2L4 DS 0H
MVC (*)void(256,r1,0),input(r6,0)
MVC (*)void(256,r1,256),input(r6,256)
MVC (*)void(256,r1,512),input(r6,512)
MVC (*)void(256,r1,768),input(r6,768)
MVC (*)void(256,r1,1024),input(r6,1024)
MVC (*)void(256,r1,1280),input(r6,1280)
MVC (*)void(256,r1,1536),input(r6,1536)
LA r1,(*)void(,r1,1792)
LA r6,input(,r6,1792)
BRCT r0,@2L4
MVC (*)void(256,r1,0),input(r6,0)
MVC (*)void(256,r1,256),input(r6,256)
MVC (*)void(256,r1,512),input(r6,512)
MVC (*)void(256,r1,768),input(r6,768)
MVC (*)void(16,r1,1024),input(r6,1024)
Kirk Wolf
Dovetailed Technologies
http://dovetail.com
On Tue, May 31, 2011 at 8:22 AM, Binyamin Dissen<bdis...@dissensoftware.com
wrote:
If the move is for an unknown length but is likely to be less than 256:
Is it worth checking the length for a specific value and proceed with MVC
loop
if small enough and MVCL if large?
--
Binyamin Dissen<bdis...@dissensoftware.com>
http://www.dissensoftware.com
Director, Dissen Software, Bar& Grill - Israel
Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.
I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu 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 lists...@bama.ua.edu 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 lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html