> it took me some time to actualy get what you do (not BASE64 - but the
> RISBG) .... my guess it is the RISBG itself which is very slow and apparently
> not very pipeline-freindly (and I have no idea about the reasons).
>
> How about using this
>
> L R1,0(,R4) Load 4 source bytes
> AHI R4,4(,R4) R4 past 4 source bytes
> SLDL R0,6
> SLL R1,2
> SLDL R0,6
> SLL R1,2
> SLDL R0,6
> SLL R1,2
> SLDL R0,6
> STCM R0,B'0111',0(R6) store 3 result bytes
> AHI R6,3
>
> I bet it is faster (and not only for the person looking at it).
>
> Not that I am against new stuff. I actualy have been reverting to z10
> instructions in code written for the public (from z11 instructions).
> But there must be a gain for using them.
The code you suggest is almost identical to the code I replaced with the RISBG
sequence:
DO FROM=(R2,)
L R0,0(,R4)
LA R4,4(,R4)
SRDL R0,8
SRL R0,2
SRDL R0,6
SRL R0,2
SRDL R0,6
SRL R0,2
SRDL R0,6
STCM R1,B'1110',0(R6)
LA R6,3(,R6)
ENDDO
I shifted right from R0 toward R1 and you're doing it the other way around but
apart from that it is identical. And almost 2,5 times slower than the RISBG
sequence! (I hope you're not a betting man). I guess the pipeline doesn't like
this series of shift instructions either. It probably is just the fact that
we're using 7 shift instructions to create 3 data bytes while the 7 RISBG
instructions create 6 databytes (sounds like a factor 2) and we're only doing
half the number of iterations (getting to almost 2,5?).
Fred!
-----------------------------------------------------------------
ATTENTION:
The information in this electronic mail message is private and
confidential, and only intended for the addressee. Should you
receive this message by mistake, you are hereby notified that
any disclosure, reproduction, distribution or use of this
message is strictly prohibited. Please inform the sender by
reply transmission and delete the message without copying or
opening it.
Messages and attachments are scanned for all viruses known.
If this message contains password-protected attachments, the
files have NOT been scanned for viruses by the ING mail domain.
Always scan attachments before opening them.
-----------------------------------------------------------------