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.

A5.2.4 Modified immediate constants in <strong>ARM</strong> instructions<br />

<strong>ARM</strong> Instruction Set Encoding<br />

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

Table A5-6 shows the range of modified immediate constants available in <strong>ARM</strong> data-processing<br />

instructions, <strong>and</strong> how they are encoded in the a, b, c, d, e, f, g, h, <strong>and</strong> rotation fields in the instruction.<br />

Note<br />

rotation a b c d e f g h<br />

Table A5-6 Encoding of modified immediates in <strong>ARM</strong> processing instructions<br />

rotation a<br />

0000 00000000 00000000 00000000 abcdefgh<br />

0001 gh000000 00000000 00000000 00abcdef<br />

0010 efgh0000 00000000 00000000 0000abcd<br />

0011 cdefgh00 00000000 00000000 000000ab<br />

0100 abcdefgh 00000000 00000000 00000000<br />

. .<br />

. .<br />

. .<br />

8-bit values shifted to other even-numbered positions<br />

1001 00000000 00abcdef gh000000 00000000<br />

. .<br />

. .<br />

. .<br />

8-bit values shifted to other even-numbered positions<br />

1110 00000000 00000000 0000abcd efgh0000<br />

1111 00000000 00000000 000000ab cdefgh00<br />

a. In this table, the immediate constant value is shown in binary form, to relate<br />

abcdefgh to the encoding diagram. In assembly syntax, the immediate value<br />

is specified in the usual way (a decimal number by default).<br />

The range of values available in <strong>ARM</strong> modified immediate constants is slightly different from the range of<br />

values available in 32-bit Thumb instructions. See Modified immediate constants in Thumb instructions on<br />

page A6-17.<br />

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

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

Saved successfully!

Ooh no, something went wrong!