13.07.2015 Views

Cortex-A8 R2P2.pdf - ARM Information Center

Cortex-A8 R2P2.pdf - ARM Information Center

Cortex-A8 R2P2.pdf - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Program Flow Prediction5.2.1 Return stack predictionsThe return stack stores the address and the <strong>ARM</strong> or Thumb state of the instruction aftera function-call type branch instruction. This address is equal to the link register valuestored in r14.The following instructions cause a return stack push if predicted:• BL immediate• BLX(1) immediate• BLX(2) register• HBL (ThumbEE state)• HBLP (ThumbEE state).The following instructions cause a return stack pop if predicted:• BX r14• MOV pc, r14• LDM r13, {…pc}• LDR pc, [r13]• LDM r9, {..pc} (ThumbEE state only)• LDR pc, [r9] (ThumbEE state only).The LDR instruction can use any of the addressing modes, as long as r13 is the baseregister. Additionally, in ThumbEE state you can also use r9 as a stack pointer so theLDR and LDM instructions with pc as a destination and r9 as a base register are also treatedas a return stack pop.Because return-from-exception instructions can change processor privilege mode andsecurity state, they are not predicted. This includes the LDM(3) instruction, and the MOVSpc, r14 instruction.<strong>ARM</strong> DDI 0344E Copyright © 2006-2008 <strong>ARM</strong> Limited. All rights reserved. 5-5

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

Saved successfully!

Ooh no, something went wrong!