This is a collection of Intel®’ IA32® Software Developer's Manuals (URL of the day) and AMD' AMD64 Architecture Programmer's Manual together with the related specifications, application notes, white papers, and change logs. The collection aims to keep all available revisions. It was originally created by Michal Necasek, see OS/2 Museum.

If you have a public document, related to the IA32® specifications and missing from the collection, please mail it to me. The content of this URL and all sub-ULRs is available for convenient bulk download by rsync x86docs password "" (empty).

CBNZ, CBZ -- AArch32

CBNZ, CBZ

Compare and Branch on Nonzero and Compare and Branch on Zero compare the value in a register with zero, and conditionally branch forward a constant value. They do not affect the condition flags.

T1

1514131211109876543210
1011op0i1imm5Rn

Encoding for the CBNZ variant

Applies when (op == 1)

CBNZ{<q>} <Rn>, <label>

Encoding for the CBZ variant

Applies when (op == 0)

CBZ{<q>} <Rn>, <label>

Decode for all variants of this encoding

let n : integer = UInt(Rn); let imm32 : bits(32) = ZeroExtend{}(i::imm5::'0'); let nonzero : boolean = (op == '1'); if InITBlock() then UnpredictableProcedure(); end;

For more information about the CONSTRAINED UNPREDICTABLE behavior, see Architectural Constraints on UNPREDICTABLE behaviors.

Assembler Symbols

<q>

See Standard assembler syntax fields.

<Rn>

Is the general-purpose register to be tested, encoded in the "Rn" field.

<label>

Is the program label to be conditionally branched to. Its offset from the PC, a multiple of 2 and in the range 0 to 126, is encoded as "i:imm5" times 2.

Operation

EncodingSpecificOperations(); if nonzero != IsZero(R(n)) then CBWritePC(PC32() + imm32); end;


2025-09_rel_asl1 2026-03-12 12:57:38

Copyright © 2010-2025 Arm Limited or its affiliates. All rights reserved. This document is Non-Confidential.