Motorola DSP56800 Podręcznik Użytkownika Strona 146

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 446
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 145
Inline Assembly Language and Intrinsics
Intrinsic Functions
146
Targeting MC56F83xx/DSP5685x Controllers
Prototype
Word16 negate(Word16 svar1)
Example
int result, s1 = 0xE000; /* - 0.25 */
result = negate(s1);
// Expected value of result: 0x2000 = 0.25
L_abs
Absolute value of a 32-bit integer or fractional value returning a 32-bit result. Returns
0x7FFFFFFF for an input of 0x80000000.
Assumptions
OMR’s SA bit was set to 1 at least 3 cycles before this code, that is, saturation on data
ALU results enabled.
Prototype
Word32 L_abs(Word32 lvar1)
Example
long result, l = 0xE0000000; /* - 0.25 */
result = L_abs(s1);
// Expected value of result: 0x20000000 = 0.25
L_negate
Negates a 32-bit integer or fractional value returning a 32-bit result. Returns
0x7FFFFFFF for an input of 0x80000000.
Assumptions
OMR’s SA bit was set to 1 at least 3 cycles before this code, that is, saturation on data
ALU results enabled.
Przeglądanie stron 145
1 2 ... 141 142 143 144 145 146 147 148 149 150 151 ... 445 446

Komentarze do niniejszej Instrukcji

Brak uwag