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

Create successful ePaper yourself

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

<strong>Compiler</strong>-specific Features<br />

Where:<br />

val1<br />

val2<br />

is the first summand of the saturating add operation<br />

is the second summand of the saturating add operation.<br />

Return value<br />

The __qadd intrinsic returns the saturating add of val1 and val2.<br />

See also<br />

• __qdbl<br />

• __qsub<br />

• QADD, QSUB, QDADD, and QDSUB on page 4-94 in the Assembler <strong>Guide</strong>.<br />

4.7.27 __qdbl<br />

This intrinsic inserts instructions equivalent to the saturating add of an integer with itself<br />

into the instruction stream generated by the compiler. It enables you to obtain the<br />

saturating double of an integer from within your C or C++ code.<br />

Syntax<br />

int __qdbl(int val)<br />

Where:<br />

val<br />

is the data value to be doubled.<br />

Return value<br />

The __qdbl intrinsic returns the saturating add of val with itself, or equivalently,<br />

__qadd(val, val).<br />

See also<br />

• __qadd on page 4-80.<br />

4.7.28 __qsub<br />

This intrinsic inserts a QSUB instruction or an equivalent code sequence into the<br />

instruction stream generated by the compiler. It enables you to obtain the saturating<br />

subtraction of two integers from within your C or C++ code.<br />

<strong>ARM</strong> DUI 0348A Copyright © 2007, 2010 <strong>ARM</strong> Limited. All rights reserved. 4-81<br />

Non-Confidential

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

Saved successfully!

Ooh no, something went wrong!