09.12.2012 Views

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

Cortex-A8 Technical Reference Manual - ARM Information Center

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5.2 Predicted instructions<br />

Program Flow Prediction<br />

This section shows the instructions that the processor predicts. Unless otherwise specified, the<br />

list applies to <strong>ARM</strong>, Thumb-2, and ThumbEE instructions. See the <strong>ARM</strong> Architecture <strong>Reference</strong><br />

<strong>Manual</strong> for more information about instructions or addressing modes.<br />

The flow prediction hardware predicts the following instructions:<br />

• B conditional<br />

• B unconditional<br />

• BL<br />

• BLX(1) immediate<br />

The BL and BLX(1) instructions act as function calls and push the return address and <strong>ARM</strong><br />

or Thumb state onto the return stack.<br />

• BLX(2) register<br />

The BLX(2) instruction acts as a function call and pushes the return address and <strong>ARM</strong> or<br />

Thumb state onto the return stack.<br />

• BX<br />

The BX r14 instruction acts as a function return and pops the return address and <strong>ARM</strong> or<br />

Thumb state from the return stack.<br />

• LDM(1) with PC in the register list in <strong>ARM</strong> state<br />

The LDM instruction with r13 specified as the base register acts as a function return and<br />

pops the return address and <strong>ARM</strong> or Thumb state from the return stack.<br />

• POP with PC in register list in Thumb state<br />

The POP instruction acts as a function return and pops the return address and <strong>ARM</strong> or<br />

Thumb state from the return stack.<br />

• LDM with PC in register list in Thumb or ThumbEE state<br />

The LDM instruction with r13 specified as the base register, or r9 specified as the base<br />

register in ThumbEE state acts as a function return and pops the return address and <strong>ARM</strong><br />

or Thumb state from the return stack.<br />

• LDR with PC destination<br />

The LDR instruction with r13 specified as the base register, or r9 specified as the base<br />

register in ThumbEE state, acts as function return and pops the return address and <strong>ARM</strong><br />

or Thumb state from the return stack.<br />

• PC-destination data-processing operations in <strong>ARM</strong> state<br />

In <strong>ARM</strong> state, the second operand of a data-processing instruction can be a 32-bit<br />

immediate value, an immediate shift value, or a register shift value. An instruction with<br />

an immediate shift value or a register shift value is predicted. An instruction with a 32-bit<br />

immediate value is not predicted. For example:<br />

— MOV pc, r10, LSL r3 is predicted<br />

— ADD pc, r0, r1, LSL #2 is predicted<br />

— ADD pc, r4, #4 is not predicted.<br />

There is no restriction on the opcode predicted, but a majority of opcodes do not make<br />

sense for branch-type instructions. Usually only MOV, ADD, and SUB are useful.<br />

<strong>ARM</strong> DDI 0344K Copyright © 2006-2010 <strong>ARM</strong> Limited. All rights reserved. 5-3<br />

ID060510 Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!