29.12.2014 Views

RealView Compilation Tools Compiler Reference Guide - ARM ...

RealView Compilation Tools Compiler Reference Guide - ARM ...

RealView Compilation Tools Compiler Reference Guide - ARM ...

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>Compiler</strong>-specific Features<br />

Note<br />

This is used in the offsetof macro.<br />

Syntax<br />

__INTADDR(expr)<br />

Where:<br />

expr<br />

is an integral constant expression.<br />

Return value<br />

__INTADDR__(expr) returns an integer constant equivalent to expr.<br />

See also<br />

• Restrictions on embedded assembly on page 6-19 in the <strong>Compiler</strong> User <strong>Guide</strong>.<br />

4.1.10 __irq<br />

The __irq keyword enables a C or C++ function to be used as an interrupt routine.<br />

__irq is a function qualifier. It affects the type of the function.<br />

Restrictions<br />

All corrupted registers except floating-point registers are preserved, not only those that<br />

are normally preserved under the AAPCS. The default AAPCS mode must be used.<br />

The function exits by setting the program counter to lr-4 and the CPSR to the value in<br />

SPSR. No arguments or return values can be used with __irq functions.<br />

Note<br />

When compiling for Thumb using the --thumb option or #pragma thumb, any functions<br />

specified as __irq are compiled for <strong>ARM</strong>.<br />

See also<br />

• --thumb on page 2-86<br />

• #pragma thumb on page 4-62<br />

• Chapter 6 Handling Processor Exceptions in the Developer <strong>Guide</strong>.<br />

4-10 Copyright © 2007, 2010 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DUI 0348A<br />

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!