Branches to a specified target address.
Bits | Value |
---|---|
0-5 | 18 |
6-29 | LL |
30 | AA |
31 | LK |
b | target_address |
ba | target_address |
bl | target_address |
bla | target_address |
The b instruction branches to an instruction specified by the branch target address. The branch target address is computed one of two ways.
Consider the following when using the b instruction:
The b instruction has four syntax forms. Each syntax form has a different effect on the Link bit and Link Register.
Syntax Form | Absolute Address Bit (AA) | Fixed-Point Exception Register | Link Bit (LK) | Condition Register Field 0 |
b | 0 | None | 0 | None |
ba | 1 | None | 0 | None |
bl | 0 | None | 1 | None |
bla | 1 | None | 1 | None |
The four syntax forms of the b instruction never affect the Fixed-Point Exception Register or Condition Register Field 0. The syntax forms set the AA bit and the Link bit (LK) and determine which method of calculating the branch target address is used. If the Link bit (LK) is set to 1, then the effective address of the instruction is placed in the Link Register.
target_address | Specifies the target address. |
here: b there cror 31,31,31 # The execution of the program continues at there. there:
bl here return: cror 31,31,31 # The Link Register now contains the address of return. # The execution of the program continues at here. here: