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.

Programmer’s Model2.15 ExceptionsExceptions occur whenever the processor temporarily halts the normal flow of aprogram, for example, to service an interrupt from a peripheral. Before attempting tohandle an exception, the processor preserves the current processor state so the originalprogram can resume when the handler routine finishes.If two or more exceptions occur simultaneously, the processor deals with exceptions inthe fixed order given in Exception priorities on page 2-42.This section provides details of the processor exception handling:• Exception entry and exit summary• Leaving an exception on page 2-36.2.15.1 Exception entry and exit summaryTable 2-12 summarizes the PC value preserved in the relevant r14 on exception entryand the recommended instruction for exiting the exception handler.Table 2-12 Exception entry and exitExceptionor entryReturn instruction Previous state Notes<strong>ARM</strong> r14_xThumb r14_xSVC MOVS PC, R14_svc PC + 4 PC+2 Where the PC is the address of the SVC, SMC,or Undefined instructionSMC MOVS PC, R14_mon PC + 4 -UNDEF MOVS PC, R14_und PC + 4 PC+2PABT SUBS PC, R14_abt, #4 PC + 4 PC+4 Where the PC is the address of instructionthat had the prefetch abortFIQ SUBS PC, R14_fiq, #4 PC + 4 PC+4 Where the PC is the address of theinstruction that was not executed becauseIRQ SUBS PC, R14_irq, #4 PC + 4 PC+4the FIQ or IRQ took priorityDABT SUBS PC, R14_abt, #8 PC + 8 PC+8 Where the PC is the address of the load orstore instruction that generated the dataabortRESET - - - The value saved in r14_svc on reset isUnpredictableBKPT SUBS PC, R14_abt, #4 PC + 4 PC+4 Software breakpoint<strong>ARM</strong> DDI 0344E Copyright © 2006-2008 <strong>ARM</strong> Limited. All rights reserved. 2-35

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

Saved successfully!

Ooh no, something went wrong!