Hi folks,
I have some code that does a bunch of these:
cmp CL, 29
jne .L2
mov AL,1 (or INC AL)
xor CL, CL
.L2:
So in other words, an 8-bit comparison to a counter, & if no branch then followed by clearing the counter and setting a flag that indicates that a clear occurred.
My question is, how can I avoid the branch? I can see how I can avoid the MOV by replacing it with a CMC and ADC before the branch, but the branch is still there. My impression also is that CMOV takes a lot of time.
Thanks.