14.06.2015 Views

Power ISA™ Version 2.03 - Power.org

Power ISA™ Version 2.03 - Power.org

Power ISA™ Version 2.03 - Power.org

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Version</strong> <strong>2.03</strong><br />

Branch [and Link]<br />

BD24-form<br />

Branch [and Link]<br />

BD8-form<br />

e_b target_addr (LK=0)<br />

e_bl target_addr (LK=1)<br />

30 0 BD24 LK<br />

0 6 7 31<br />

NIA iea CIA + EXTS(BD24 || 0b0)<br />

if LK then LR iea CIA + 4<br />

se_b target_addr (LK=0)<br />

se_bl target_addr (LK=1)<br />

58 0 LK BD8<br />

0 6 7 8 15<br />

NIA iea CIA + EXTS(BD8 || 0b0)<br />

if LK then LR iea CIA + 2<br />

target_addr specifies the branch target address.<br />

The branch target address is the sum of BD24 || 0b0<br />

sign-extended and the address of this instruction, with<br />

the high-order 32 bits of the branch target address set<br />

to 0 in 32-bit mode.<br />

If LK=1 then the effective address of the instruction following<br />

the Branch instruction is placed into the Link<br />

Register.<br />

Special Registers Altered:<br />

LR<br />

(if LK=1)<br />

target_addr specifies the branch target address.<br />

The branch target address is the sum of BD8 || 0b0<br />

sign-extended and the address of this instruction, with<br />

the high-order 32 bits of the branch target address set<br />

to 0 in 32-bit mode.<br />

If LK=1 then the effective address of the instruction following<br />

the Branch instruction is placed into the Link<br />

Register.<br />

Special Registers Altered:<br />

LR<br />

(if LK=1)<br />

Branch Conditional [and Link] BD15-form<br />

e_bc BO32,BI32,target_addr (LK=0)<br />

e_bcl BO32,BI32,target_addr (LK=1)<br />

30 8 BO32 BI32 BD15 LK<br />

0 6 10 12 16 31<br />

if (64-bit mode)<br />

then M 0<br />

else M 32<br />

if BO32 0 then CTR M:63 CTR M:63 - 1<br />

ctr_ok ¬BO32 0 | ((CTR M:63 ≠ 0) ⊕ BO32 1 )<br />

cond_ok BO32 0 | (CR BI32+32 ≡ BO32 1 )<br />

if ctr_ok & cond_ok then<br />

NIA iea (CIA + EXTS(BD15 || 0b0))<br />

else<br />

NIA iea CIA + 4<br />

if LK then LR iea CIA + 4<br />

The BI32 field specifies the Condition Register bit to be<br />

tested. The BO32 field is used to resolve the branch as<br />

described in Figure 18. target_addr specifies the<br />

branch target address.<br />

The branch target address is the sum of BD15 || 0b0<br />

sign-extended and the address of this instruction, with<br />

the high-order 32 bits of the branch target address set<br />

to 0 in 32-bit mode.<br />

If LK=1 then the effective address of the instruction<br />

following the Branch instruction is placed into the Link<br />

Register.<br />

Special Registers Altered:<br />

CTR (if BO32 0 =1)<br />

LR<br />

(if LK=1)<br />

Branch Conditional Short Form BD8-form<br />

se_bc<br />

BO16,BI16,target_addr<br />

28 BO16 BI16 BD8<br />

0 5 6 8 15<br />

cond_ok (CR BI16+32 ≡ BO16)<br />

if cond_ok then<br />

NIA iea CIA + EXTS(BD8 || 0b0)<br />

else NIA iea CIA + 2<br />

The BI16 field specifies the Condition Register bit to be<br />

tested. The BO16 field is used to resolve the branch as<br />

described in Figure 19. target_addr specifies the<br />

branch target address.<br />

The branch target address is the sum of BD8 || 0b0<br />

sign-extended and the address of this instruction, with<br />

the high-order 32 bits of the branch target address set<br />

to 0 in 32-bit mode.<br />

Special Registers Altered:<br />

None<br />

656<br />

<strong>Power</strong> ISA -- Book VLE

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!