|
|||||||||||
|
Technical Support On-Line Manuals Compiler Reference Guide |
Compiler Reference Guide__qsax intrinsic
This intrinsic inserts a unsigned int __qsax(unsigned int where:
The
The returned results are saturated to the 16-bit signed integer range -215 ≤ x ≤ 215 - 1. Example:
unsigned int exchange_subtract_and_add(unsigned int val1, unsigned int val2)
{
unsigned int res;
res = __qsax(val1,val2); /* res[15:0] = val1[15:0] + val2[31:16]
res[31:16] = val1[31:16] - val2[15:0]
*/
/* Alternative equivalent representation:
val2[15:0][31:16] = val2[31:16][15:0]
res[15:0] = val1[15:0] + val2[15:0]
res[31:16] = val[31:16] - val2[31:16]
*/
return res;
}
| ||||||||||
|
|||||||||||