I was looking up some ARM assembly and i notice EOR/XOR and AND all set the C and O flag. How does that work? Are they always cleared? what conditions are they set?
ARM carry flag on EOR/XOR and AND
Recall that you can arbitrarily shift the result following the operation. The carry flag is set based on the carry out from the barrel shifter. The overflow flag is never affected.