05.02.2013 Views

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

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.

The System Level Programmers’ Model<br />

Aborts, exceptions, <strong>and</strong> checks<br />

Aborts <strong>and</strong> exceptions are unchanged in ThumbEE. A null check takes priority over an abort or watchpoint<br />

on the same memory access. For more information, see Null checking on page A9-3.<br />

The IT state bits in the CPSR are always cleared on entry to a NullCheck or IndexCheck h<strong>and</strong>ler. For more<br />

information, see IT block <strong>and</strong> check h<strong>and</strong>lers on page A9-5.<br />

B1.9.2 Jazelle direct bytecode execution<br />

In Jazelle state the processor executes bytecode programs, as described in Jazelle state on page A2-74.<br />

The processor instruction set state is indicated by the CPSR.J <strong>and</strong> CPSR.T bits, see Program Status<br />

Registers (PSRs) on page B1-14. (J,T) == 0b10 when the processor is in Jazelle state. For more information<br />

about entering <strong>and</strong> leaving Jazelle state see Jazelle state on page B1-81.<br />

Extension of the PC to 32 bits<br />

To enable the PC to point to an arbitrary bytecode instruction, in a non-trivial Jazelle implementation all 32<br />

bits of the PC are defined. In the PC, bit [0] always reads as zero when in <strong>ARM</strong>, Thumb, or ThumbEE state.<br />

The existence of bit [0] in the PC is only visible in <strong>ARM</strong>, Thumb, or ThumbEE states when an exception<br />

occurs in Jazelle state <strong>and</strong> the exception return address is odd-byte aligned.<br />

The main architectural implication of this is that an exception h<strong>and</strong>ler must ensure that it restores all 32 bits<br />

of the PC. The recommended ways of h<strong>and</strong>ling exception returns behave correctly.<br />

Exception h<strong>and</strong>ling in the Jazelle extension<br />

Exceptions on page B1-30 describes how exception entry occurs if an exception occurs while the processor<br />

is executing in Jazelle state. This section gives more information about how exceptions in Jazelle state are<br />

taken <strong>and</strong> h<strong>and</strong>led.<br />

Interrupts <strong>and</strong> Fast interrupts, IRQ <strong>and</strong> FIQ<br />

To enable the st<strong>and</strong>ard mechanism for h<strong>and</strong>ling interrupts to work correctly, a Jazelle hardware<br />

implementation must ensure that one of the following applies at the point where execution of a bytecode<br />

instruction might be interrupted by an IRQ or FIQ:<br />

Execution has reached a bytecode instruction boundary. That is:<br />

— all operations required to implement one bytecode instruction have completed<br />

— no operations required to implement the next bytecode instruction has completed.<br />

The LR value on entry to the interrupt h<strong>and</strong>ler must be (address of the next bytecode instruction) + 4.<br />

The sequence of operations performed from the start of execution of the current bytecode instruction,<br />

up to the point where the interrupt occurs, is idempotent. This means that the sequence can be<br />

repeated from its start without changing the overall result of executing the bytecode instruction.<br />

B1-74 Copyright © 1996-1998, 2000, 2004-2008 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DDI 0406B

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

Saved successfully!

Ooh no, something went wrong!