29.10.2014 Views

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

ARM Compiler toolchain v4.1 for µVision Using the Compiler

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.

<strong>Using</strong> <strong>the</strong> Inline and Embedded Assemblers of <strong>the</strong> <strong>ARM</strong> <strong>Compiler</strong><br />

7.22 Inline assembler register list operands in C and C++ code<br />

A register list can contain a maximum of 16 operands. These operands can be virtual registers<br />

or expression register operands.<br />

The order that virtual registers and expression operands are specified in a register list is<br />

significant. The register list operands are read or written in left-to-right order. The first operand<br />

uses <strong>the</strong> lowest address, and subsequent operands use addresses <strong>for</strong>med by incrementing <strong>the</strong><br />

previous address by four. This behavior is in contrast to <strong>the</strong> usual operation of <strong>the</strong> LDM or STM<br />

instructions where <strong>the</strong> lowest numbered physical register is always stored to <strong>the</strong> lowest memory<br />

address. This difference in behavior is a consequence of <strong>the</strong> virtualization of registers.<br />

An expression operand or virtual register can appear more than once in a register list and is used<br />

each time it is specified.<br />

The base register is updated, if specified. The update overwrites any value loaded into <strong>the</strong> base<br />

register during a memory load operation.<br />

Operating on User mode registers when in a privileged mode, by specifying ^ after a register<br />

list, is not supported by <strong>the</strong> inline assembler.<br />

7.22.1 See also<br />

Concepts<br />

• Inline assembler operands in C and C++ code on page 7-25<br />

• <strong>Compiler</strong> support <strong>for</strong> inline assembly language on page 7-4.<br />

<strong>ARM</strong> DUI 0375C Copyright © 2007-2008, 2011 <strong>ARM</strong>. All rights reserved. 7-27<br />

ID061811<br />

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!