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.

Application Level Programmers’ Model<br />

A2.2.1 Integer arithmetic<br />

The instruction set provides a wide variety of operations on the values in registers, including bitwise logical<br />

operations, shifts, additions, subtractions, multiplications, <strong>and</strong> many others. These operations are defined<br />

using the pseudocode described in Appendix I Pseudocode Definition, usually in one of three ways:<br />

By direct use of the pseudocode operators <strong>and</strong> built-in functions defined in Operators <strong>and</strong> built-in<br />

functions on page AppxI-11.<br />

By use of pseudocode helper functions defined in the main text. These can be located using the table<br />

in Appendix J Pseudocode Index.<br />

By a sequence of the form:<br />

1. Use of the SInt(), UInt(), <strong>and</strong> Int() built-in functions defined in Converting bitstrings to<br />

integers on page AppxI-14 to convert the bitstring contents of the instruction oper<strong>and</strong>s to the<br />

unbounded integers that they represent as two's complement or unsigned integers.<br />

2. Use of mathematical operators, built-in functions <strong>and</strong> helper functions on those unbounded<br />

integers to calculate other such integers.<br />

3. Use of either the bitstring extraction operator defined in Bitstring extraction on page AppxI-12<br />

or of the saturation helper functions described in Pseudocode details of saturation on<br />

page A2-9 to convert an unbounded integer result into a bitstring result that can be written to<br />

a register.<br />

A2-4 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!