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

unsigned char __clz(unsigned int val)<br />

Where:<br />

val<br />

is an unsigned int.<br />

Return value<br />

The __clz intrinsic returns the number of leading zeros in val.<br />

See also<br />

• __builtin_clz on page 4-64<br />

• CLZ on page 4-53 in the Assembler <strong>Guide</strong>.<br />

4.7.11 __current_pc<br />

This intrinsic enables you to determine the current value of the program counter at the<br />

point in your program where the intrinsic is used.<br />

Syntax<br />

unsigned int __current_pc(void)<br />

Return value<br />

The __current_pc intrinsic returns the current value of the program counter at the point<br />

in the program where the intrinsic is used.<br />

See also<br />

• __current_sp<br />

• __return_address on page 4-83<br />

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

User <strong>Guide</strong>.<br />

4.7.12 __current_sp<br />

This intrinsic returns the value of the stack pointer at the current point in your program.<br />

Syntax<br />

unsigned int __current_sp(void)<br />

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