Shr2 - Optimized Version Of Shr Intrinsic Function; Intrinsic Functions; Shr2 Arguments - Freescale Semiconductor DSP56800E User Manual

Hide thumbs Also See for DSP56800E:
Table of Contents

Advertisement

shr2 - optimized version of shr intrinsic function

2.4.3.4
Call(s):
Word16 shr2(Word16 num, UWord16 shifts);
Arguments:
num
shifts
Description: The shr2 function performs a multi-bit arithmetic shift of the first parameter to the
right by the amount specified in the second parameter. The result is returned as a 16-bit integer.
This function is the optimized version of the shr intrinsic function (see CodeWarrior Help for
more information on shr).
Returns: num parameter shifted shifts times to the right
Example 2-33. shr2 function usage
Word16 var1 = 16;
Word16 result;
result = shr2(var1, 3); /* returns 0x0002 */
This code shifts var1 variable three times to the right and returns the result in the result variable.
2.4.4

Intrinsic Functions

The DSP56800E_Quick_Start tool exploits the system intrinsic functions defined in
intrinsics_56800E.h header file distributed with the CodeWarrior Development Studio 56800/E
Hybrid Controllers.
To preserve compatibility with the DSP56800_Quick_Start tool, the intrinsics_56800E.h is
included in types.h header file.
FREESCALE SEMICONDUCTOR
Table 2-18. shr2 arguments
in
parameter to be shifted
in
number of shifts
Targeting 56F8xxx Platform
Boot Sequence
2-23

Advertisement

Table of Contents
loading

Table of Contents