| |||
| Home > ARMv6 SIMD Instruction Intrinsics > __uxtab16 intrinsic | |||
This intrinsic inserts a UXTAB16 instruction
into the instruction stream generated by the compiler. It enables
you to extract two 8-bit values from one operand, zero-extend them
to 16 bits each, and add the results to two 16-bit values from another
operand.
unsigned int __uxtab16(unsigned intval1, unsigned intval2)
Where [7:0]
and val2[23:16] hold
the two 8-bit values to be zero-extended.val2
The __uxtab16 intrinsic returns the 8-bit
values in , zero-extended
to 16-bit values and added to val2.val1
Example:
unsigned int extend_add(unsigned int val1, unsigned int val2)
{
unsigned int res;
res = __uxtab16(val1,val2); /* res[15:0] = ZeroExt(val2[7:0] to 16 bits)
+ val1[15:0]
res[31:16] = ZeroExt(val2[31:16] to 16 bits)
+ val1[31:16]
*/
return res;
}