You copied the Doc URL to your clipboard.

Carry flag

The carry (C) flag is set when an operation results in a carry, or when a subtraction results in no borrow.

In A32/T32 code, C is set in one of the following ways:

  • For an addition, including the comparison instruction CMN, C is set to 1 if the addition produced a carry (that is, an unsigned overflow), and to 0 otherwise.
  • For a subtraction, including the comparison instruction CMP, C is set to 0 if the subtraction produced a borrow (that is, an unsigned underflow), and to 1 otherwise.
  • For non-additions/subtractions that incorporate a shift operation, C is set to the last bit shifted out of the value by the shifter.
  • For other non-additions/subtractions, C is normally left unchanged, but see the individual instruction descriptions for any special cases.
  • The floating-point compare instructions, VCMP and VCMPE set the C flag and the other condition flags in the FPSCR to the result of the comparison.