Extract from a larger macro. And no, I was not overly concerned with
performance.
.* r15 : length
.* r14 -> source
.* r0 -> target
.* r1 used when short copy
.* select method
clfi r15,255 if source length
jh &l.ml gt 255 then use movelong
bctr r15,0
lr r1,r0 copy target address
ex r15,&l.ms
j &l.x
&l.ms mvc 0(*-*,r1),0(r14) short copy
&l.ml lr r1,r15 copy length
mvcl r0,r14 long copy
&l.x ds 0h
Willy
-----Oprindelig meddelelse-----
Fra: IBM Mainframe Assembler List <[email protected]> På vegne af
Tony Thigpen
Sendt: 20. oktober 2020 14:43
Til: [email protected]
Emne: Conditional MVCL macro?
I have several programs that work with buffers and moving random length data
around using MVCLs. I am considering writing a 'conditional MVCL'
macro that, at runtime, looks at the lengths and either executes the MVCL or
bypasses it and uses a MVC via EX.
I know this would generate a longer code segment due to the dual-path.
1) With new machines, I wonder if the micro-code/mili-code already optimizes
the MVCL making this a null-issue?
2) Is anyone else willing to share an existing macro that performs this
function?
Tony Thigpen