ADSP-BF53x/BF56x Blackfin Processor Programming Reference
14-19
Shift/Rotate Operations
Example
p3 = p2 >> 1 ;
/* pointer right shift by 1 */
p3 = p3 >> 2 ;
/* pointer right shift by 2 */
p4 = p5 << 1 ;
/* pointer left shift by 1 */
p0 = p1 << 2 ;
/* pointer left shift by 2 */
r3 >>= 17 ;
/* data right shift */
r3 <<= 17 ;
/* data left shift */
r3.l = r0.l >> 4 ;
/* data right shift, half-word register */
r3.l = r0.h >> 4 ;
/* same as above; half-word register combi-
nations are arbitrary */
r3.h = r0.l << 12 ;
/* data left shift, half-word register */
r3.h = r0.h << 14 ;
/* same as above; half-word register com-
binations are arbitrary */
r3 = r6 >> 4 ;
/* right shift, 32-bit word */
r3 = r6 << 4 ;
/* left shift, 32-bit word */
a0 = a0 >> 7 ;
/* Accumulator right shift */
a1 = a1 >> 25 ;
/* Accumulator right shift */
a0 = a0 << 7 ;
/* Accumulator left shift */
a1 = a1 << 14 ;
/* Accumulator left shift */
r3 >>= r0 ;
/* data right shift */
r3 <<= r1 ;
/* data left shift */
r3.l = lshift r0.l by r2.l ;
/* shift direction controlled by
sign of R2.L */
r3.h = lshift r0.l by r2.l ;
a0 = lshift a0 by r7.l ;
a1 = lshift a1 by r7.l ;
/* If r0.h = -64 (or 0xFFC0), then performing . . . */
r3.h = r0.h >> 4 ;
/* . . . produces r3.h = 0x0FFC (or 4092),
losing the sign */
Содержание ADSP-BF53x Blackfin
Страница 38: ...Conventions xxxviii ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 134: ...System Reset and Powerup 3 18 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 324: ...Instruction Overview 7 20 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 486: ...Instruction Overview 13 28 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 512: ...Instruction Overview 14 26 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 604: ...Instruction Overview 15 92 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 688: ...Instruction Overview 18 48 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 742: ...Instruction Overview 19 54 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 752: ...Examples 20 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 780: ...Product Identification Register 21 28 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 790: ...ADSP BF535 Flags A 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 800: ...Performance Monitor Registers B 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 994: ...Instructions Listed By Operation Code C 194 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Страница 1042: ...Index I 40 ADSP BF53x BF56x Blackfin Processor Programming Reference...