What does “installed” mean in Intel Assembly?

This is what I see in the documentation Intel x86-64for the neg command, which is confusing.

" OF , SF , ZF , AF and PF flags are set according to the result.

I assume that sf = dest < 0, zf = dest == 0but cannot understand how other flags are set.

I see this “set according to expression” everywhere and I will be grateful for your help in understanding what it means for sure. I am working on a compiler, so the information is certainly important.

+4
source share
1 answer

Thus, all flags are set based on the operation performed, which means the phrase "specified in accordance with the result."

3.4.3.1 Status Flags

The status flags (bits 0, 2, 4, 6, 7, and 11) of the EFLAGS register indicate the results of arithmetic instructions, such as the ADD, SUB, MUL, and DIV instructions. Status Flag Functions:

  • CF (bit 0) Carry flag . Set if the arithmetic operation generates a carry or borrow from the most significant bit of the result; cleared otherwise. This flag indicates the overflow condition for unsigned arithmetic. It is also used in multi-point arithmetic.
  • PF ( 2) AF ( 4) - , 3 ; . - (BCD) .
  • ZF ( 6) - , ; .
  • SF ( 7) . , . (0 , 1 .)
  • OF ( 11) . , , ( ), ; . - ( ).

CF , STC, CLC CMC. (BT, BTS, BTR BTC) CF.

CF . .

- Intel

+5

All Articles