Instruction Overview
15-20
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
The division can either be signed or unsigned, but the dividend and divi-
sor must both be of the same type. The divisor cannot be negative. A
signed division operation, where the dividend may be negative, begins the
sequence with the
DIVS
(“divide-sign”) instruction, followed by repeated
execution of the
DIVQ
(“divide-quotient”) instruction. An unsigned divi-
sion omits the
DIVS
instruction. In that case, the user must manually clear
the
AQ
flag of the
ASTAT
register before issuing the
DIVQ
instructions.
Up to 16 bits of signed quotient resolution can be calculated by issuing
DIVS
once, then repeating the
DIVQ
instruction 15 times. A 16-bit
unsigned quotient is calculated by omitting
DIVS
, clearing the
AQ
flag, then
issuing 16
DIVQ
instructions.
Less quotient resolution is produced by executing fewer
DIVQ
iterations.
The result of each successive addition or subtraction appears in
dividend_register
, aligned and ready for the next addition or subtraction
step. The contents of
divisor_register
are not modified by this
instruction.
The final quotient appears in the low-order half-word of
dividend_register
at the end of the successive add/subtract sequence.
DIVS
computes the sign bit of the quotient based on the signs of the divi-
dend and divisor.
DIVS
initializes the
AQ
flag based on that sign, and
initializes the dividend for the first addition or subtraction.
DIVS
performs
no addition or subtraction.
DIVQ
either adds (di divisor) or subtracts (dividend – divisor)
based on the
AQ
flag, then reinitializes the
AQ
flag and dividend for the next
iteration. If
AQ
is 1, addition is performed; if
AQ
is 0, subtraction is
performed.
See
“Flags Affected” on page 15-4
for the conditions that set and clear the
AQ
flag.
Summary of Contents for ADSP-BF53x Blackfin
Page 38: ...Conventions xxxviii ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 134: ...System Reset and Powerup 3 18 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 324: ...Instruction Overview 7 20 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 486: ...Instruction Overview 13 28 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 512: ...Instruction Overview 14 26 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 604: ...Instruction Overview 15 92 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 688: ...Instruction Overview 18 48 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 742: ...Instruction Overview 19 54 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 752: ...Examples 20 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 790: ...ADSP BF535 Flags A 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 800: ...Performance Monitor Registers B 10 ADSP BF53x BF56x Blackfin Processor Programming Reference...
Page 1042: ...Index I 40 ADSP BF53x BF56x Blackfin Processor Programming Reference...