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.

Assembler syntax<br />

CMP , #<br />

where:<br />

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

Instruction Details<br />

The first oper<strong>and</strong> register. SP can be used in Thumb (encoding T2) as well as in <strong>ARM</strong>.<br />

The immediate value to be compared with the value obtained from . The range of values<br />

is 0-255 for encoding T1. See Modified immediate constants in Thumb instructions on<br />

page A6-17 or Modified immediate constants in <strong>ARM</strong> instructions on page A5-9 for the<br />

range of values for encoding T2 <strong>and</strong> A1.<br />

Operation<br />

if ConditionPassed() then<br />

EncodingSpecificOperations();<br />

(result, carry, overflow) = AddWithCarry(R[n], NOT(imm32), ‘1’);<br />

APSR.N = result;<br />

APSR.Z = IsZeroBit(result);<br />

APSR.C = carry;<br />

APSR.V = overflow;<br />

Exceptions<br />

None.<br />

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

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

Saved successfully!

Ooh no, something went wrong!