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 Instruction Sets<br />

These instructions can optionally set the condition code flags, according to the result of the operation. If<br />

they do not set the flags, existing flag settings from a previous instruction are preserved.<br />

Table A4-2 summarizes the main data-processing instructions in the Thumb <strong>and</strong> <strong>ARM</strong> instruction sets.<br />

Generally, each of these instructions is described in three sections in Chapter A8 Instruction Details, one<br />

section for each of the following:<br />

INSTRUCTION (immediate) where the second oper<strong>and</strong> is a modified immediate constant.<br />

INSTRUCTION (register) where the second oper<strong>and</strong> is a register, or a register shifted by a constant.<br />

INSTRUCTION (register-shifted register) where the second oper<strong>and</strong> is a register shifted by a value<br />

obtained from another register. These are only available in the <strong>ARM</strong> instruction set.<br />

Instruction Mnemonic Notes<br />

Add with Carry ADC -<br />

Table A4-2 St<strong>and</strong>ard data-processing instructions<br />

Add ADD Thumb instruction set permits use of a modified immediate<br />

constant or a zero-extended 12-bit immediate constant.<br />

Form PC-relative Address ADR First oper<strong>and</strong> is the PC. Second oper<strong>and</strong> is an immediate constant.<br />

Thumb instruction set uses a zero-extended 12-bit immediate<br />

constant. Operation is an addition or a subtraction.<br />

Bitwise AND AND -<br />

Bitwise Bit Clear BIC -<br />

Compare Negative CMN Sets flags. Like ADD but with no destination register.<br />

Compare CMP Sets flags. Like SUB but with no destination register.<br />

Bitwise Exclusive OR EOR -<br />

Copy oper<strong>and</strong> to destination MOV Has only one oper<strong>and</strong>, with the same options as the second<br />

oper<strong>and</strong> in most of these instructions. If the oper<strong>and</strong> is a shifted<br />

register, the instruction is an LSL, LSR, ASR, or ROR instruction<br />

instead. For details see Shift instructions on page A4-10.<br />

The <strong>ARM</strong> <strong>and</strong> Thumb instruction sets permit use of a modified<br />

immediate constant or a zero-extended 16-bit immediate constant.<br />

Bitwise NOT MVN Has only one oper<strong>and</strong>, with the same options as the second<br />

oper<strong>and</strong> in most of these instructions.<br />

Bitwise OR NOT ORN Not available in the <strong>ARM</strong> instruction set.<br />

Bitwise OR ORR -<br />

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

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

Saved successfully!

Ooh no, something went wrong!