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

Errors<br />

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

does not support the SEV instruction. The compiler generates either a warning or an error<br />

in this case.<br />

See also<br />

• __nop on page 4-89<br />

• __wfe on page 4-107<br />

• __wfi on page 4-107<br />

• __yield on page 4-108<br />

• NOP, SEV, WFE, WFI, and YIELD on page 4-142 in the Assembler Guide.<br />

4.7.33 __sqrt<br />

This intrinsic inserts a VFP VSQRT instruction into the instruction stream generated by<br />

the compiler. It enables you to obtain the square root of a double-precision<br />

floating-point value from within your C or C++ code.<br />

Note<br />

The __sqrt intrinsic is an analogue of the standard C library function sqrt. It differs<br />

from the standard library function in that a call to __sqrt is guaranteed to be compiled<br />

into a single, inline, machine instruction on an <strong>ARM</strong> architecture-based processor<br />

equipped with a VFP coprocessor.<br />

Syntax<br />

double __sqrt(double val)<br />

Where:<br />

val<br />

is a double-precision floating-point value.<br />

Return value<br />

The __sqrt intrinsic returns the square root of val as a double.<br />

Errors<br />

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

not equipped with a VFP coprocessor. The compiler generates either a warning or an<br />

error in this case.<br />

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

ID101213<br />

Non-Confidential,

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

Saved successfully!

Ooh no, something went wrong!