Compaq ECQD2KCTE manual Unconditional Branch

Models: ECQD2KCTE

1 371
Download 371 pages 20.35 Kb
Page 77
Image 77

4.3.2 Unconditional Branch

Format:

BxRRa.wq,disp.al!Branch format

Operation:

{update PC} Ra PC

PC PC + {4*SEXT(disp)}

Exceptions:

 

None

 

Instruction mnemonics:

 

BR

Unconditional Branch

BSR

Branch to Subroutine

Qualifiers:

 

None

 

Description:

The PC of the following instruction (the updated PC) is written to register Ra and then the PC is loaded with the target address.

The displacement is treated as a signed longword offset. This means it is shifted left two bits (to address a longword boundary), sign-extended to 64 bits, and added to the updated PC to form the target virtual address.

The unconditional branch instructions are PC-relative. The 21-bit signed displacement gives a forward/backward branch distance of +/– 1M instructions.

PC-relative addressability can be established by:

BR Rx,L1

L1:

Notes:

BR and BSR do identical operations. They only differ in hints to possible branch-pre- diction logic. BSR is predicted as a subroutine call (pushes the return address on a branch-prediction stack), whereas BR is predicted as a branch (no push).

Instruction Descriptions 4–21

Page 77
Image 77
Compaq ECQD2KCTE manual Unconditional Branch