Motorola DSP56800 Guía de usuario Pagina 169

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 446
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 168
Inline Assembly Language and Intrinsics
Intrinsic Functions
169Targeting MC56F83xx/DSP5685x Controllers
Example
short result;
short s1 = 0x1234;
short s2 = 1;
result = shl(s1,s2);
// Expected value of result: 0x2468
shlftNs
Arithmetic shift of 16-bit value by a specified shift amount. If the shift count is
positive, a left shift is performed. Otherwise, a right shift is performed. Saturation does
not occur during a left shift. When an accumulator is the destination, zeroes out the
LSP portion.
NOTE
Ignores upper N-5 bits of s_shftamount except the sign bit (MSB).
If s_shftamount is positive and the value in the lower 5 bits of
s_shftamount is greater than 15, the result is 0.
If s_shftamount is negative and the absolute value in the lower 5 bits
of s_shftamount is greater than 15, the result is 0 if sval2shft is
positive, and 0xFFFF if sval2shft is negative.
Prototype
Word16 shlftNs(Word16 sval2shft, Word16 s_shftamount)
Vista de pagina 168
1 2 ... 164 165 166 167 168 169 170 171 172 173 174 ... 445 446

Comentarios a estos manuales

Sin comentarios