Skip to content

CTZ

Operation

Counts trailing zero bits in the selected-width source and writes the count.

Assembler Syntax

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

CTZ.{B|W|L|Q}(z) Rn(s), Rn(d)

Privilege

Unprivileged

Repeat eligibility

REP eligible; REPcc observes dst

Counts the trailing zero bits within the selected operand size and writes the count to the destination register. A zero operand returns the operand width in bits.

2.75in

Encodings

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

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

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

2.75in CTZ.{B|W|L|Q}(z) Rn(s), Rn(d)

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

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