CBHS (immediate)

Compare unsigned greater than or equal 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 greater than or equal to the immediate. It provides a hint that this is not a subroutine call or return. This instruction does not affect the condition flags.

Encoding: Branch

Variants: FEAT_CMPBR (ARMv9.6)

313029282726252423222120191817161514131211109876543210
11101010100
sfccimm6imm9Rt

32-bit higher (sf == 0)

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

Equivalent to: CBHI <Wt>, #<imm>, <label>

64-bit higher (sf == 1)

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

Equivalent to: CBHI <Xt>, #<imm>, <label>

Explanations

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