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

Syntax<br />

long __builtin_expect(long int expr, long int c)<br />

Where:<br />

expr<br />

c<br />

is an integral expression<br />

is a compile-time constant.<br />

Return value<br />

__builtin_expect returns the value of expr.<br />

Example<br />

if (__builtin_expect(i, 0))<br />

{<br />

foo(); // we do not expect foo to be called,<br />

} // because we expect i to be zero<br />

4.7.5 __builtin_frame_address<br />

This builtin function returns the frame address of the current function. The frame<br />

address is usually the address of the first word the function pushes on to the stack.<br />

Note<br />

This builtin function is a GNU compiler extension that is supported by the <strong>ARM</strong><br />

compiler.<br />

Mode<br />

Supported in GNU mode only.<br />

Syntax<br />

void *__builtin_frame_address(unsigned int val)<br />

Where:<br />

val<br />

is an unsigned integer evaluating to zero.<br />

Return value<br />

__builtin_frame_address returns the address of the frame of the current function.<br />

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