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

int __qsub(int val1, int val2)<br />

Where:<br />

val1<br />

val2<br />

is the minuend of the saturating subtraction operation<br />

is the subtrahend of the saturating subtraction operation.<br />

Return value<br />

The __qsub intrinsic returns the saturating subtraction of val1 and val2.<br />

See also<br />

• __qadd on page 4-80<br />

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

4.7.29 __rbit<br />

This intrinsic inserts an RBIT instruction into the instruction stream generated by the<br />

compiler. It enables you to reverse the bit order in a 32-bit word from within your C or<br />

C++ code.<br />

Syntax<br />

unsigned int __rbit(unsigned int val)<br />

where:<br />

val<br />

is the data value whose bit order is to be reversed.<br />

Return value<br />

The __rbit intrinsic returns the value obtained from val by reversing its bit order.<br />

See also<br />

• REV, REV16, REVSH, and RBIT on page 4-64 in the Assembler <strong>Guide</strong>.<br />

4.7.30 __rev<br />

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

instruction stream generated by the compiler. It enables you to convert a 32-bit<br />

big-endian data value into a little-endian data value, or a 32-bit little-endian data value<br />

into big-endian data value from within your C or C++ code.<br />

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