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.

System Instructions<br />

Assembler syntax<br />

VMRS , <br />

where:<br />

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

The destination <strong>ARM</strong> core register. This register can be R0-R14.<br />

Is one of:<br />

If is FPSCR, it is also permitted to be APSR_nzcv, encoded as Rt = ’1111’. This<br />

instruction transfers the FPSCR N, Z, C, <strong>and</strong> V flags to the APSR N, Z, C, <strong>and</strong> V flags.<br />

FPSID reg = ’0000’<br />

FPSCR reg = ’0001’<br />

MVFR1 reg = ’0110’<br />

MVFR0 reg = ’0111’<br />

FPEXC reg = ’1000’.<br />

If the Common VFP subarchitecture is implemented, see Subarchitecture additions to the<br />

VFP system registers on page AppxB-15 for additional values of .<br />

The pre-UAL instruction FMSTAT is equivalent to VMRS APSR_nzcv, FPSCR.<br />

Operation<br />

if ConditionPassed() then<br />

EncodingSpecificOperations();<br />

if reg == ‘0001’ then // FPSCR<br />

CheckVFPEnabled(TRUE); SerializeVFP(); VFPExcBarrier();<br />

if t == 15 then<br />

APSR.N = FPSCR.N; APSR.Z = FPSCR.Z; APSR.C = FPSCR.C; APSR.V = FPSCR.V;<br />

else<br />

R[t] = FPSCR;<br />

else // Non-FPSCR registers are privileged-only <strong>and</strong> not affected by FPEXC.EN<br />

CheckVFPEnabled(FALSE);<br />

if !CurrentModeIsPrivileged() then UNDEFINED;<br />

case reg of<br />

when ‘0000’ SerializeVFP(); R[t] = FPSID;<br />

// ‘0001’ already dealt with above<br />

when ‘001x’ UNPREDICTABLE;<br />

when ‘010x’ UNPREDICTABLE;<br />

when ‘0110’ SerializeVFP(); R[t] = MVFR1;<br />

when ‘0111’ SerializeVFP(); R[t] = MVFR0;<br />

when ‘1000’ SerializeVFP(); R[t] = FPEXC;<br />

otherwise SUBARCHITECTURE_DEFINED register access;<br />

Exceptions<br />

Undefined Instruction.<br />

B6-28 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!