Beruflich Dokumente
Kultur Dokumente
abs_s(Word16 argument.
var1)
Word16 Performs short add of var1 and var2,
add(Word16 var1, with overflow control and saturation. If
Word16 var2)
overflow occurs, 16-bit result is +32767;
if underflow occurs, 16-bit result is -
32768.
Word32 Adds 32-bit arguments.
add2(Word32 var1,
Word32
var2);
Word16 Performs short divide: fractional integer
div_s(Word16 division of var1 by var2. Both
var1,
Word16 arguments must be positive; var2 must
var2); not exceed var1. Result is positive
(leading bit = 0), truncated to 16 bits.
Word16 Returns most significant 16 bits of 32-
extract_h(Word32 bit argument.
L_var1);
Word16 Returns least significant 16 bits of 32-bit
extract_l(Word32 L_var1); argument.
Word32 Performs multiply accumulate: multiplies var1
L_mac(Word32 L_var3, by var2 and shifts result left by 1. Adds 32-bit
Word16 var1,
Word16 var2); result to L_var3 with saturation, returning 32-
bit result.
Word32 Performs multiply subtract: multiplies var1 by
L_msu(Word32 L_var3, var2 and shifts result left by 1. Subtracts 32-bit
Word16 var1,
Word16 var2); result from L_var3 with saturation, returning
32-bit result.
Word16 Performs multiply, accumulate, and round:
mac_r(Word32 L_var3, multiplies var1 by var2 and shifts result left by
Word16 var1,
Word16 var2); 1. Adds 32-bit result to L_var3 with saturation.
Rounds the result's least significant 16 bits into
the most significant 16 bits with saturation,
then shifts the result right by 16. Returns 16-bit
result.
Word16 Returns the greater of two 16-bit fractional
max(Word16 var1, arguments.
Word16 var2);
Word32 Returns the greater of two 32-bit fractional
max2(Word32 var1, arguments.
Word32 var2);
Word16 Returns the greater of two 16-bit fractional
maxm(Word16 var1, arguments.
Word16 var2);
Word16 Returns the lesser of two 16-bit fractional
min(Word16 var1, arguments.
Word16 var2);
Word32 Returns the lesser of two 32-bit fractional
min2(Word32 var1, arguments.
Word32 var2);
Word16 Performs multiply, subtract, and round:
msu_r(Word32 L_var3, multiplies var1 by var2 and shifts result left by
Word16 var1,
Word16 var2); 1. Subtracts 32-bit result from L_var3 with
saturation. Rounds the result's least significant
16 bits into the most significant 16 bits with
saturation, then shifts the result right by 16.
Returns 16-bit result.
Word16 Performs short multiply of var1 by var2, giving
mult(Word16 var1, scaled, 16-bit result.
Word16 var2);
Word16 With addition or subtraction, prevents creation
mult_nomac(Word16 var1, of atomic Mac sequences. Useful if saturation
Word16 var2);
of atomic operation and sequence saturation
are not equivalent.
Word16 Performs short multiply, with rounding.
mult_r(Word16 var1,
Word16 var2);
Word16 Negates var1 with saturation.
negate(Word16 var1);
Word16 Normalizes 16-bit fractional argument: shifts
norm_s(Word16 var1); left enough times to normalize a positive var1
(interval 16384 - 32767), or to normalize a
negative var 1 (interval -32768 - -16384).
Word16 Normalizes negatively: multiplies result of
neg_norm_s(Word16 var1);
norm_s by -1.
Word16 Rounds least significant 16 bits of L_var1 into
round(Word32 L_var1); most significant 16 bits, with saturation. Shifts
resulting bits right by 16, returning 16-bit
result.
Word16 Limits 32-bit argument to the range of a 16-bit
saturate(Word32 L_var1); word.
Word16 Performs short shift left: arithmetically shifts
shl(Word16 var1, var1 left var2 positions, zero-filling the var2
Word16 var2);
least significant positions of the result. If var2
is negative, arithmetically shifts var1 right by
var2 with sign extension. Saturates result in
case of underflow or overflow.
Word16 Performs short shift left without saturation.
shl_nosat(Word16 var1,
Like shl, but does not saturate result in case of
Word16 var2);
underflow or overflow.
Word16 Performs short shift right: arithmetically shifts
shr(Word16 var1, var1 right var2 positions with sign extension. If
Word16 var2);
var2 is negative, arithmetically shifts var1 left
by var2 with sign extension. Saturates the
result in case of underflow or overflow.
Word16 Performs short shift right without saturation.
shr_nosat(Word16 var1,
Like shr, but does not saturate result in case of
Word16 var2);
underflow or overflow.
Word16 Performs short shift right with rounding. Like
shr_r(Word16 var1,
shr, but with rounded result.
Word16 var2);
Word16 Performs short subtract of var2 from var1, with
sub(Word16 var1, overflow control and saturation. If overflow
Word16 var2);
occurs, 16-bit result is +32767; if underflow
occurs, 16-bit result is -32768.
Word32 Subtracts 32-bit var2 value from 32-bit var1
sub2(Word32 var1, value.
Word32 var2);