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.

A9.5.1 CHKA<br />

ThumbEE<br />

CHKA (Check Array) compares the unsigned values in two registers. If the first is lower than, or the same as,<br />

the second, it copies the PC to the LR, <strong>and</strong> causes a branch to the IndexCheck h<strong>and</strong>ler.<br />

Encoding E1 ThumbEE<br />

CHKA ,<br />

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

1 1 0 0 1 0 1 0 N Rm Rn<br />

n = UInt(N:Rn); m = UInt(Rm);<br />

if n == 15 || BadReg(m) then UNPREDICTABLE;<br />

Assembler syntax<br />

CHKA , <br />

where:<br />

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

The first oper<strong>and</strong> register. This contains the array size. Use of the SP is permitted.<br />

The second oper<strong>and</strong> register. This contains the array index.<br />

Operation<br />

if ConditionPassed() then<br />

EncodingSpecificOperations();<br />

if UInt(R[n])

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

Saved successfully!

Ooh no, something went wrong!