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.

Instruction Details<br />

A8.6.50 IT<br />

If Then makes up to four following instructions (the IT block) conditional. The conditions for the<br />

instructions in the IT block can be the same, or some of them can be the inverse of others.<br />

IT does not affect the condition code flags. Branches to any instruction in the IT block are not permitted,<br />

apart from those performed by exception returns.<br />

16-bit instructions in the IT block, other than CMP, CMN <strong>and</strong> TST, do not set the condition code flags. The AL<br />

condition can be specified to get this changed behavior without conditional execution.<br />

See also ITSTATE on page A2-17, Conditional instructions on page A4-4, <strong>and</strong> Conditional execution on<br />

page A8-8.<br />

Encoding T1 <strong>ARM</strong>v6T2, <strong>ARM</strong>v7<br />

IT{x{y{z}}} Not permitted in IT block<br />

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

1 0 1 1 1 1 1 1 firstcond mask<br />

if mask == ‘0000’ then SEE “Related encodings”;<br />

if firstcond == ‘1111’ then UNPREDICTABLE;<br />

if firstcond == ‘1110’ && BitCount(mask) != 1 then UNPREDICTABLE;<br />

if InITBlock() then UNPREDICTABLE;<br />

Related encodings See If-Then, <strong>and</strong> hints on page A6-12<br />

Assembler syntax<br />

IT{x{y{z}}} <br />

where:<br />

The condition for the second instruction in the IT block.<br />

The condition for the third instruction in the IT block.<br />

The condition for the fourth instruction in the IT block.<br />

See St<strong>and</strong>ard assembler syntax fields on page A8-7. An IT instruction must be<br />

unconditional.<br />

The condition for the first instruction in the IT block. See Table A8-1 on page A8-8 for the<br />

range of conditions available, <strong>and</strong> the encodings.<br />

Each of , , <strong>and</strong> can be either:<br />

T Then. The condition attached to the instruction is .<br />

E Else. The condition attached to the instruction is the inverse of . The condition<br />

code is the same as , except that the least significant bit is inverted. E must not<br />

be specified if is AL.<br />

A8-104 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!