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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Compiler-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-132 in the Assembler Guide.<br />

4.7.2 __cdp<br />

This intrinsic inserts a CDP or CDP2 instruction into the instruction stream generated by<br />

the compiler. It enables you to include coprocessor data operations in your C or C++<br />

code.<br />

Syntax<br />

__cdp(unsigned int coproc, unsigned int opcode1, unsigned int opcode2)<br />

Where:<br />

coproc<br />

opcode1<br />

Identifies the coprocessor the instruction is for.<br />

coproc must be an integer in the range 0 to 15.<br />

Is a coprocessor-specific opcode.<br />

Add 0x100 to the opcode to generate a CDP2 instruction.<br />

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

Non-Confidential,<br />

ID101213

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

Saved successfully!

Ooh no, something went wrong!