Motorola MPC823e Reference Manual page 1189

Microprocessor for mobile computing
Table of Contents

Advertisement

cntlzw
Assembler Syntax
BIT
0
1
2
FIELD
31
BIT
16
17
18
FIELD
00000
Definition
Operation
Description
MOTOROLA
cntlzw
rA,rS (Rc = 0)
cntlzw.
rA,rS (Rc = 1)
3
4
5
6
7
19
20
21
22
23
Count Leading Zeros Word
n ← 0
do while n < 32
if rS[n] = 1 then leave
n ← n + 1
rA ← n
A count of the number of consecutive zero bits starting at bit 0 of
rS is placed into rA. This number ranges from 0 to 32, inclusive.
Other registers altered:
Condition Register (CR0 field):
Affected: LT, GT, EQ, SO(if Rc = 1)
If Rc = 1, then LT is cleared in the CR0 field.
POWERPC ARCHITECTURE
LEVEL
UISA
MPC823e REFERENCE MANUAL
MPC823e Instruction Set—cntlzw
8
9
10
11
12
S
24
25
26
27
28
26
SUPERVISOR
OPTIONAL
LEVEL
13
14
15
A
29
30
31
RC
FORM
X
B-31

Advertisement

Table of Contents
loading

Table of Contents