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

Create successful ePaper yourself

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

Assembler syntax<br />

MRS , <br />

where:<br />

See St<strong>and</strong>ard assembler syntax fields on page A8-7.<br />

The destination register.<br />

Is one of:<br />

Operation<br />

System Instructions<br />

• APSR<br />

• CPSR<br />

• SPSR.<br />

<strong>ARM</strong> recommends the APSR form when only the N, Z, C, V, Q, or GE[3:0] bits of the read<br />

value are going to be used (see The Application Program Status Register (APSR) on<br />

page A2-14).<br />

if ConditionPassed() then<br />

EncodingSpecificOperations();<br />

if read_spsr then<br />

if CurrentModeIsUserOrSystem() then<br />

UNPREDICTABLE;<br />

else<br />

R[d] = SPSR[];<br />

else<br />

// CPSR is read with execution state bits other than E masked out.<br />

R[d] = CPSR AND ‘11111000 11111111 00000011 11011111’;<br />

Exceptions<br />

None.<br />

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

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

Saved successfully!

Ooh no, something went wrong!