| |||
| Home > Programmer’s Model > The program status registers > The J bit | |||
The J bit in the CPSR indicates when the ARM1136JF-S processor is in Java state.
When:
The processor is in ARM or Thumb state, depending on the T bit.
The processor is in Java state.
The combination of J = 1 and T = 1 causes similar effects to setting T=1 on a non Thumb-aware processor. That is, the next instruction executed causes entry to the Undefined Instruction exception. Entry to the exception handler causes the processor to re-enter ARM state, and the handler can detect that this was the cause of the exception because J and T are both set in SPSR_und.
MSR cannot be used to change the J bit in the CPSR.
The placement of the J bit avoids the status or extension bytes in code running on ARMv5TE or earlier processors. This ensures that OS code written using the deprecated CPSR, SPSR, CPSR_all, or SPSR_all syntax for the destination of an MSR instruction continues to work.