Download Print this page

Texas Instruments TMS320C67X Reference Manual page 201

Dsp and cpu instruction set

Advertisement

LMBD
Syntax
Compatibility
Opcode
31
29
28
27
creg
z
dst
3
1
5
Description
SPRU733
Leftmost Bit Detection
LMBD (.unit) src1, src2, dst
.unit = .L1 or .L2
C62x, C64x, C67x, and C67x+ CPU
23
22
18
src2
5
Opcode map field used...
src1
src2
dst
src1
src2
dst
The LSB of the src1 operand determines whether to search for a leftmost 1 or 0
in src2. The number of bits to the left of the first 1 or 0 when searching for a 1
or 0, respectively, is placed in dst.
The following diagram illustrates the operation of LMBD for several cases.
When searching for 0 in src2, LMBD returns 0:
0 1 x x x x x x
x
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
When searching for 1 in src2, LMBD returns 4:
0
0
0
0
1
x x
x
x
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
When searching for 0 in src2, LMBD returns 32:
1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9
17
13
12
11
src1/cst5
x
5
1
For operand type...
uint
xuint
uint
cst5
xuint
uint
x
x
x
x
x x
x
x
x x x x x x x x x x x x x x x
x x x x x x x x
x x x x x x x
Leftmost Bit Detection
5
4
3
op
1 1 0 s p
7
Unit
Opfield
.L1, .L2
110 1011
.L1, .L2
110 1010
8
7
6
5 4
3
x
x
x
x
x
8
7
6
5 4
3
1 1 1 1 1 1 1 1 1
8
7
6
5 4
3
Instruction Set
LMBD
2
1
0
1
1
2
1
0
x
x
x
2
1
0
2
1
0
3-141

Hide quick links:

Advertisement

loading
Need help?

Need help?

Do you have a question about the TMS320C67X and is the answer not in the manual?

Subscribe to Our Youtube Channel

Save PDF