b

Branch (A32)

B<c> <label>

Branch relative (PC +/- 32MB).

Pseudocode Operation

if condition_satisfied then
  PC ← PC + (sign_extend(imm24) << 2) + 8

Example

B label

Encoding

Binary Layout
cond
31:28
101
27:25
0
24
imm24
23:0
 
Format Branch
Opcode 0x0A000000
Extension A32 (Base)

Operands

  • label
    Label

Related

Other forms of b

  • b Branch

More in A32 (Base)

Reference

Instruction Forms

Encoding Instruction ISA Bit pattern
0x0A000000 B{<c>}{<q>} <label> A32 cond | 101 | 0 | imm24
0xD000 B<c>{<q>} <label> T32 1101 | cond | imm8
0xE000 B{<c>}{<q>} <label> T32 11100 | imm11
0xF0008000 B<c>.W <label> T32 11110 | S | cond | imm6 | 10 | J1 | 0 | J2 | imm11
0xF0009000 B{<c>}.W <label> T32 11110 | S | imm10 | 10 | J1 | 1 | J2 | imm11

Description

Branch causes a branch to a target address.

Operation

if ConditionPassed() then
    EncodingSpecificOperations();
    BranchWritePC(PC + imm32, BranchType_DIR);