12.38 __sxtb16 intrinsic

This intrinsic inserts an SXTB16 instruction into the instruction stream generated by the compiler.

It enables you to extract two 8-bit values from an operand and sign-extend them to 16 bits each.

Syntax

unsigned int __sxtb16(unsigned int val)
Where val[7:0] and val[23:16] hold the two 8-bit values to be sign-extended.

Return value

The __sxtb16 intrinsic returns the 8-bit values sign-extended to 16-bit values.

Examples

unsigned int sign_extend(unsigned int val)
{
    unsigned int res;
    res = __sxtb16(val1,val2); /* res[15:0] = SignExtended(val[7:0]
                                  res[31:16] = SignExtended(val[23:16]
                                */
    return res;
}
Related reference
9.143 ARMv6 SIMD intrinsics
Related information
SXTB16
ARM and Thumb instruction summary
Non-ConfidentialPDF file icon PDF versionARM DUI0375E
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.