Notes:
Except that it is likely in many implementations to be substantially faster, the instruction:
CMOVEQ Ra,Rb,Rc
is exactly equivalent to:
BNE Ra,label
OR Rb,Rb,Rc label: ...
For example, a branchless sequence for:
R1=MAX(R1,R2)
is:
CMPLT R1,R2,R3 | ! | R3=1 | if | R1<R2 |
|
CMOVNE R3,R2,R1 | ! | Move | R2 | to R1 | if R1<R2 |