User`s manual

2-10 Optimizing DSP56300/DSP56600 Applications MOTOROLA
Data Operations
BIt manipulation instructions
move #base-1,r4 ; 1
move a1,x1 ; 1
move x:(r0)+,a ; 1
do #N/2,_ENDLOOP ; 5
move x:(r0)+,b b,y:(r4)+; 1 x N/2
normf x1,a ; 1 x N/2
normf x1,b ; 1 x N/2
move x:(r0)+,a a,y:(r4)+; 1 x N/2
_ENDLOOP
move b,y:(r4)+ ; 1
;Total: 3N + 22
2.5 BIT MANIPULATION INSTRUCTIONS
The data ALU has a special Bit Field Unit (BFU) that supports
powerful bit-manipulation instructions that enable an application to
insert/ extract a bit field of varying width and position to/from an
accumulator. These instructions are summarized in Table 2-5.
The EXTRACT(U) and INSERT instruction use a control operand
(C) that specifies the bit field to be extracted or inserted. The bit field
Table 2-5 Bit manipulation instructions
Mnemonic Function Operands
EXTRACT
Extract a
bit field
C,S,D
C: Source field position
& width
S: Data source
D: Data Destination
6-bit immediate, or:
X0,X1,Y0,Y1,A1,B1
A,B
A,B
EXTRACTU
Extract an
unsigned
bit field
INSERT
Insert a bit
field
C,S,D
C: Destination field
position & width
S: Data source
D: Data Destination
6-bit immediate, or:
X0,X1,Y0,Y1,A1,B1
X0,X1,Y0,Y1,A1,B1
A,B
MERGE
Merge
field &
width
data to
one
register
S,D
S: Width Data Source.
D: Position data source
& merging destination
X0,X1,Y0,Y1,A1,B1
A,B