← Home

CBHS (immediate)

Compare unsigned higher than or same as immediate and branch

This instruction compares the unsigned value in a register with an immediate, and conditionally branches to a label at a PC-relative offset if the register value is higher than or the same as the immediate. This instruction provides a hint that this is not a subroutine call or return. This instruction does not affect the condition flags.

This is a pseudo-instruction of CB<cc> (immediate). This means:

Branch class

(FEAT_CMPBR)

313029282726252423222120191817161514131211109876543210
sf1110101010imm60imm9Rt
cc

32-bit higher encoding

(sf == 0)

CBHS <Wt>, #<immp1>, <label>

is equivalent to

CBHI <Wt>, #<imm>, <label>

64-bit higher encoding

(sf == 1)

CBHS <Xt>, #<immp1>, <label>

is equivalent to

CBHI <Xt>, #<imm>, <label>

Assembler Symbols

<Wt>

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

<immp1>

Is an unsigned immediate, in the range 1 to 64, encoded as "imm6" plus 1.

<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.

<Xt>

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

Operation

The description of CB<cc> (immediate) gives the operational pseudocode for this instruction.


Version 2025.09 — Copyright © 2010-2025 Arm Limited or its affiliates.

This site is provided as a community resource and is NOT affiliated with nor endorsed by Arm Limited.