3.5.4. CLZ

Count Leading Zeros.

Syntax

CLZ{cond} Rd, Rm

Where:

cond

Is an optional condition code. See Conditional execution.

Rd

Is the destination register.

Rm

Is the operand register.

Operation

The CLZ instruction counts the number of leading zeros in the value in Rm and returns the result in Rd. The result value is 32 if no bits are set and zero if bit[31] is set.

Restrictions

Do not use SP and do not use PC.

Condition flags

This instruction does not change the flags.

Examples

    CLZ     R4,R9
    CLZNE   R2,R3
Copyright © 2015, 2018 Arm. All rights reserved.ARM DUI 0646C
Non-ConfidentialID121118