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

4.7.83 __sxtb16 intrinsic<br />

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

compiler. It enables you to extract two 8-bit values from an operand and sign-extend<br />

them to 16 bits each.<br />

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

Where val[7:0] and val[23:16] hold the two 8-bit values to be sign-extended.<br />

The __sxtb16 intrinsic returns the 8-bit values sign-extended to 16-bit values.<br />

Example:<br />

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

{<br />

unsigned int res;<br />

}<br />

res = __sxtb16(val1,val2); /* res[15:0] = SignExtended(val[7:0]<br />

res[31:16] = SignExtended(val[23:16]<br />

*/<br />

return res;<br />

See also<br />

• <strong>ARM</strong>v6 SIMD intrinsics on page 4-109<br />

• Instruction summary on page 4-2 in the Assembler Guide<br />

• SXT, SXTA, UXT, and UXTA on page 4-109 in the Assembler Guide.<br />

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