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

Where:<br />

val<br />

is a compile-time constant integer whose range is:<br />

0 ... 65535 if you are compiling source as <strong>ARM</strong> code<br />

0 ... 255 if you are compiling source as Thumb code.<br />

Errors<br />

The compiler does not recognize the __breakpoint intrinsic when compiling for a target<br />

that does not support the BKPT instruction. The compiler generates either a warning or<br />

an error in this case.<br />

The undefined instruction trap is taken if a BKPT instruction is executed on an<br />

architecture that does not support it.<br />

Example<br />

void func(void)<br />

{<br />

...<br />

__breakpoint(0xF02C);<br />

...<br />

}<br />

See also<br />

• BKPT on page 4-129 in the Assembler <strong>Guide</strong>.<br />

4.7.2 __builtin_clz<br />

This builtin function inserts a CLZ instruction or an equivalent code sequence into the<br />

instruction stream generated by the compiler. It is functionally equivalent to the intrinsic<br />

__clz, except that the return type is int instead of unsigned char.<br />

Note<br />

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

compiler.<br />

See also<br />

• __clz on page 4-69<br />

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

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