CBB<cc>

Compare bytes and branch

This instruction compares the byte values in two registers, and conditionally branches to a label at a PC-relative offset if the condition is true. This instruction provides a hint that this is not a subroutine call or return. This instruction does not affect the condition flags.

This instruction is used by the pseudo-instructions CBBLE, CBBLO, CBBLS, and CBBLT.

Branch
(FEAT_CMPBR)

313029282726252423222120191817161514131211109876543210
01110100ccRm10imm9Rt
H

Encoding for the Greater than variant

Applies when (cc == 000)

CBBGT <Wt>, <Wm>, <label>

Encoding for the Greater than or equal variant

Applies when (cc == 001)

CBBGE <Wt>, <Wm>, <label>

Encoding for the Higher variant

Applies when (cc == 010)

CBBHI <Wt>, <Wm>, <label>

Encoding for the Higher or same variant

Applies when (cc == 011)

CBBHS <Wt>, <Wm>, <label>

Encoding for the Equal variant

Applies when (cc == 110)

CBBEQ <Wt>, <Wm>, <label>

Encoding for the Not equal variant

Applies when (cc == 111)

CBBNE <Wt>, <Wm>, <label>

Decode for all variants of this encoding

if !IsFeatureImplemented(FEAT_CMPBR) then EndOfDecode(Decode_UNDEF); end; let datasize : integer{} = 8 << UInt(H); let t : integer = UInt(Rt); let m : integer = UInt(Rm); let offset : bits(64) = SignExtend{}(imm9::'00'); var op : CmpOp; var unsigned : boolean; case cc of when '000' => op = Cmp_GT; unsigned = FALSE; when '001' => op = Cmp_GE; unsigned = FALSE; when '010' => op = Cmp_GT; unsigned = TRUE; when '011' => op = Cmp_GE; unsigned = TRUE; when '110' => op = Cmp_EQ; unsigned = TRUE; when '111' => op = Cmp_NE; unsigned = TRUE; otherwise => EndOfDecode(Decode_UNDEF); end;

Assembler Symbols

<Wt>

Is the 32-bit name of the general-purpose register to be tested, encoded in the "Rt" field.

<Wm>

Is the 32-bit name of the second general-purpose source register, encoded in the "Rm" field.

<label>

Is the program label to be conditionally branched to. Its offset from the address of this instruction, in the range -1024 to 1020, is encoded as "imm9" times 4.


2026-03_rel 2026-03-26 20:48:11

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