dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 174

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Data Arithmetic Logic Unit
Accumulator extension registers can also interfere with the correct calculation of condition codes for
unsigned numbers when an arithmetic operation generates a 36-bit result. The TST and CMP instructions,
among others, exhibit this problem.
On the DSP56800, the recommended solution was to set the CM bit in the OMR register before using any
of the unsigned jump and branch conditions (HS, LS, HI, and LO) after a TST or CMP instruction. For
DSP56800E code, use of the CM bit is not generally recommended. Instead, instructions that exactly
match the size of the data should be used:
Using these instructions guarantees that the extension registers are not considered when condition codes
are calculated.
5.4.2
Unsigned multiplications are supported with the IMPYUU instruction, which accepts two 16-bit
multiplicands from the lowest portion of the accumulators (FF0). This instruction is illustrated in
Example 5-18.
The IMACUS and IMPYSU instructions are provided for multiplying one signed value and one unsigned
value. However, be careful with these instructions, because one of the 16-bit multiplicands is in the upper
portion (FF1) of an accumulator, and the other is in the lower portion (FF0). See the entries for these
instructions in Appendix A, “Instruction Set Details,” for more information on the placement of operands.
Fractional unsigned multiplications are supported with the MPYSU and MACSU instructions. Again, be
careful, because one of the 16-bit multiplicands is in the upper portion (FF1) of an accumulator, and the
other is in the lower portion (FF0).
5-28
TST.B and CMP.B for bytes
TST.W and CMP.W for words
TST.L and CMP.L for long words
Unsigned Single-Precision Multiplication
MOVE.W
MOVE.W
LSR16
LSR16
IMPYUU
X:(R0),A
X:(SP-2),B
A
B
A0,B0,D
Example 5-18. Multiplication of 2 Unsigned Words
DSP56800E Core Reference Manual
; Load 1 word from memory
; Load 1 word from memory
; Place unsigned value in FF0 portion
; Place unsigned value in FF0 portion
; Multiply 2 unsigned words
Freescale Semiconductor

Related parts for dsp56800e