Motorola DSP56800 Podręcznik Użytkownika Strona 166

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 446
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 165
Inline Assembly Language and Intrinsics
Intrinsic Functions
166
Targeting MC56F83xx/DSP5685x Controllers
Example
long ll = 0x20000000;/* .25 */
short result;
result = ffs_l(ll);
// Expected value of result: 1
norm_l
Computes the number of left shifts required to normalize a 32-bit value, returning a
16-bit result. Returns a shift count of 0 for an input of 0x00000000.
NOTE
Does not actually normalize the value! This operation is not optimal
on the DSP56800E because of the case of returning 0 for an input of
0x00000000. See the intrinsic ffs_l
which is more optimal but
generates a different value for the case where the input ==
0x00000000.
Prototype
Word16 norm_l(Word32 lsrc)
Example
long ll = 0x20000000;/* .25 */
short result;
result = norm_l(ll);
// Expected value of result: 1
Przeglądanie stron 165
1 2 ... 161 162 163 164 165 166 167 168 169 170 171 ... 445 446

Komentarze do niniejszej Instrukcji

Brak uwag