04.01.2015 Views

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

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.

Compiler-specific Features<br />

4.9.2 Usage<br />

You can declare named register variables as global variables. You can declare some, but<br />

not all, named register variables as local variables. In general, do not declare VFP<br />

registers and core registers as local variables. Do not declare caller-save registers, such<br />

as R0, as local variables.<br />

4.9.3 Example<br />

In the following example, foo is declared globally as a named register variable for the<br />

register r0.<br />

register int foo __asm("r0");<br />

void func(void)<br />

{<br />

....<br />

}<br />

4.9.4 See also<br />

• Named register variables on page 4-12 in the Compiler User Guide.<br />

4-194 Copyright © 2007-2010 <strong>ARM</strong>. All rights reserved. <strong>ARM</strong> DUI 0348C<br />

Non-Confidential,<br />

ID101213

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

Saved successfully!

Ooh no, something went wrong!