dsp56800 Freescale Semiconductor, Inc, dsp56800 Datasheet - Page 193

no-image

dsp56800

Manufacturer Part Number
dsp56800
Description
16-bit Digital Signal Controllers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
8.1.4.2
The MIN operation can be emulated as shown in the following code:
; MIN Operation
;
; MIN Operation
; Emulated at 4 Icyc
8.1.5
There are two versions of this operation. In the first, the accumulator only contains 16 bits of useful
information in A1 or B1, and it is necessary to sign extend into A2 or B2. In the second version, both A1
and A0 or B1 and B0 contain useful information. The following code shows both versions:
; Sign-Extension Operation of 16-bit Accumulator Data
; Emulated in 1 Icyc, 1 Instruction Word
; Sign-Extension Operation of 32-bit Accumulator Data
; Emulated in 4 Icyc, 4 Instruction Words
8.1.6
The unsigned load of an accumulator, which zeros the LSP and extension register, can be exactly emulated
as shown in the following code:
; DSP56100 Family Unsigned Load
; Emulated at 2 Icyc
;
; DSP56800 Family Unsigned Load
; Emulated at 2 Icyc
This operation is important for processing unsigned numbers when the CC bit in the operating mode
register (OMR) register is a 0, so that the condition codes are set using information at bit 35. This operation
is useful for performing unsigned additions and subtractions on 36-bit values.
Freescale Semiconductor
MIN
------ becomes ------
CMP
TGT
MOVE
PUSH
MOVE
POP
MOVE
ZERO
------ becomes ------
CLR
MOVE
Accumulator Sign Extend
Unsigned Load of an Accumulator
MIN Operation
Y0,A
Y0,A
Y0,A
A1,A
A0
A1,A
A0
x:(R0),A
A
A
x:(R0),A1
; (can also use TGE if desired)
; Sign extend into A2, clear A0 register
; Save A0 register
; Sign extend into A2, clear A0 register
; Restore A0 register to correct contents
Software Techniques
Useful Instruction Operations
8-7

Related parts for dsp56800