Bit Test, Set, Clear, Toggle; Field Extract And Field Deposit - Analog Devices ADSP-BF53x Blackfin Reference

Table of Contents

Advertisement

Barrel Shifter (Shifter)
The following example shows the input value rotated. Assume the Condi-
tion Code (
) bit is set to 0. For more information about
CC
"Condition Code Flag" on page
R0 contains ABCD EF12 ;
R2.L contains 0004 ;
R1 = R0 ROT by R2.L ;
results in
R1 contains BCDE F125 ;
Note the
bit is included in the result, at bit 3.
CC

Bit Test, Set, Clear, Toggle

The shifter provides the method to test, set, clear, and toggle specific bits
of a data register. All instructions have two arguments—the source register
and the bit field value. The test instruction does not change the source
register. The result of the test instruction resides in the
The following examples show a variety of operations.
BITCLR ( R0, 6 ) ;
BITSET ( R2, 9 ) ;
BITTGL ( R3, 2 ) ;
CC = BITTST ( R3, 0 ) ;

Field Extract and Field Deposit

If the shifter is used, a source field may be deposited anywhere in a 32-bit
destination field. The source field may be from 1 bit to 16 bits in length.
In addition, a 1- to 16-bit field may be extracted from anywhere within a
32-bit source field.
2-52
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
4-18.
, see
CC
bit.
CC

Advertisement

Table of Contents
loading

This manual is also suitable for:

Adsp-bf56x blackfin

Table of Contents