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 />

See also<br />

• Other builtin functions on page 4-197<br />

• __current_pc on page 4-78<br />

• __return_address on page 4-95<br />

• Legacy inline assembler that accesses sp, lr, or pc on page 7-27 in the Compiler<br />

User Guide.<br />

4.7.7 __disable_fiq<br />

This intrinsic disables FIQ interrupts.<br />

Note<br />

Typically, this intrinsic disables FIQ interrupts by setting the F-bit in the CPSR.<br />

However, for v7-M it sets the fault mask register (FAULTMASK). FIQ interrupts are<br />

not supported in v6-M.<br />

Syntax<br />

int __disable_fiq(void);<br />

void __disable_fiq(void);<br />

Usage<br />

The function prototype to use for this intrinsic depends on the target architecture you<br />

are compiling for. For <strong>ARM</strong>v7 (--cpu=7), use void __disable_fiq(void);. For all other<br />

architectures, including <strong>ARM</strong>v7-A, <strong>ARM</strong>v7-R, and <strong>ARM</strong>v7-M, you can use<br />

int __disable_fiq(void); or void __disable_fiq(void);.<br />

Return value<br />

int __disable_fiq(void); returns the value the FIQ interrupt mask has in the PSR prior<br />

to the disabling of FIQ interrupts.<br />

Restrictions<br />

The difference in function prototypes between the generic <strong>ARM</strong>v7 architecture and the<br />

<strong>ARM</strong>v7 A, R, and M-profiles exists because the way that the previous FIQ state is<br />

returned differs between the M-profile and the A and R-profiles. This means that when<br />

you compile with --cpu=7, the compiler is unable to generate an instruction sequence<br />

that works on all <strong>ARM</strong>v7 processors, so you must use the void __disable_fiq(void);<br />

function prototype with --cpu=7.<br />

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

ID101213<br />

Non-Confidential,

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

Saved successfully!

Ooh no, something went wrong!