bctar

Branch Conditional to Target Address Register

bctar BO,BI,BH (LK=0)

Conditional branch based on the contents of the Condition Register and the Count Register.

Details

Performs a conditional branch to the target address held in the Target Address Register (TAR). The branch condition is determined by the values of the Branch Options (BO) field and the Condition Register bit (BI). The Count Register may also influence the branch condition depending on BO. No status flags are updated; the instruction may update the Link Register if suffixed with LK=1.

Pseudocode Operation

if condition(BO, BI, CTR) then
  NIA ← TAR
else
  NIA ← CIA + 4

Programming Note

In some systems, the system software will restrict usage of the bctar[l] instruction to only selected programs. If an attempt is made to execute the instruction when it is not available, the system error handler will be invoked.

Example

bctar 20, 0, BH (LK=0)

Encoding

Binary Layout
19
0
BO
6
BI
11
/
16
BH
19
560
21
/
31
 
Format XL-form
Opcode 0x4C000460
Extension Base
Registers Altered CTR, LR

Operands

  • BO
    Options
  • BI
    CR Bit
  • BH
    Hint