Skip to content

CMP

Operation

Computes a comparison result and updates condition codes without storing the temporary value.

Assembler Syntax

CMP.{L|Q}(z) Rn(s), Rn(d)

CMP.{B|W|L|Q}(z) Rn(s), <ea>(e)

CMP.{B|W|L|Q}(z) <ea>(e), Rn(d)

CMP.{B|W|L|Q}(z) <ea>(s), <ea>(d)

Privilege

Unprivileged

Repeat eligibility

REP eligible; REPcc observes computed

Subtracts the source from the destination only to derive FLAGS.Z, FLAGS.N, FLAGS.C, and FLAGS.V; the temporary selected-width difference is not written to either operand. The temporary difference supplies the REPcc observed value.

2.75in

Encodings

CMP.{L|Q}(z) Rn(s), Rn(d)

Format: Instruction format for CMP.{L|Q}(z) Rn(s), Rn(d)

Format: Instruction format for CMP.{L|Q}(z) Rn(s), Rn(d)

2.75in CMP.{B|W|L|Q}(z) Rn(s), <ea>(e)

Format: Instruction format for CMP.{B|W|L|Q}(z) Rn(s), <ea>(e)

Format: Instruction format for CMP.{B|W|L|Q}(z) Rn(s), <ea>(e)

2.75in CMP.{B|W|L|Q}(z) <ea>(e), Rn(d)

Format: Instruction format for CMP.{B|W|L|Q}(z) <ea>(e), Rn(d)

Format: Instruction format for CMP.{B|W|L|Q}(z) <ea>(e), Rn(d)

2.75in CMP.{B|W|L|Q}(z) <ea>(s), <ea>(d)

Format: Instruction format for CMP.{B|W|L|Q}(z) <ea>(s), <ea>(d)

Format: Instruction format for CMP.{B|W|L|Q}(z) <ea>(s), <ea>(d)