uint32_t __QADD16
uint32_t __QADD16
(
(
uint32_t
uint32_t
val1
val1
,
,
uint32_t
uint32_t
val2
val2
)
)
Q setting dual 16-bit saturating addition.
This function enables you to perform two 16-bit integer arithmetic additions in parallel, saturating the results to the 16-bit signed integer range -2
15
<= x <=
2
15
- 1.
Parameters
val1 first two 16-bit summands.
val2 second two 16-bit summands.
Returns
the saturated addition of the low halfwords, in the low halfword of the return value.
the saturated addition of the high halfwords, in the high halfword of the return value.
The returned results are saturated to the 16-bit signed integer range -2
15
<= x <= 2
15
- 1
Operation:
res[15:0] = val1[15:0] + val2[15:0]
res[31:16] = val1[31:16] + val2[31:16]
uint32_t __QADD8
uint32_t __QADD8
(
(
uint32_t
uint32_t
val1
val1
,
,
uint32_t
uint32_t
val2
val2
)
)
Q setting quad 8-bit saturating addition.
This function enables you to perform four 8-bit integer additions, saturating the results to the 8-bit signed integer range -2
7
<= x <= 2
7
- 1.
Parameters
val1 first four 8-bit summands.
val2 second four 8-bit summands.
Returns
the saturated addition of the first byte of each operand in the first byte of the return value.
the saturated addition of the second byte of each operand in the second byte of the return value.
the saturated addition of the third byte of each operand in the third byte of the return value.
the saturated addition of the fourth byte of each operand in the fourth byte of the return value.
The returned results are saturated to the 16-bit signed integer range -2
7
<= x <= 2
7
- 1.
Operation:
res[7:0] = val1[7:0] + val2[7:0]
res[15:8] = val1[15:8] + val2[15:8]
res[23:16] = val1[23:16] + val2[23:16]
res[31:24] = val1[31:24] + val2[31:24]
uint32_t __QASX
uint32_t __QASX
(
(
uint32_t
uint32_t
val1
val1
,
,
uint32_t
uint32_t
val2
val2
)
)
Q setting dual 16-bit add and subtract with exchange.
This function enables you to exchange the halfwords of the one operand, then add the high halfwords and subtract the low halfwords, saturating the results to
the 16-bit signed integer range -2
15
<= x <= 2
15
- 1.
Parameters
val1 first operand for the subtraction in the low halfword, and the first operand for the addition in the high halfword.
val2 second operand for the subtraction in the high halfword, and the second operand for the addition in the low halfword.
Returns
the saturated subtraction of the high halfword in the second operand from the low halfword in the first operand, in the low halfword of the return
value.
the saturated addition of the high halfword in the first operand and the low halfword in the second operand, in the high halfword of the return value.
The returned results are saturated to the 16-bit signed integer range -2
15
<= x <= 2
15
- 1.
Operation:
res[15:0] = val1[15:0] - val2[31:16]
res[31:16] = val1[31:16] + val2[15:0]