dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 237

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Several operations for jumping and branching can be emulated, depending on the selected bits in a bitfield,
overflows, or other condition codes.
7.5.4.1
The JRSET and JRCLR operations are very similar to the BRSET and BRCLR instructions. Like BRSET
and BRCLR, they perform a bitfield test and branch based on the result. However, the BRSET and BRCLR
instructions only allow branches to locations that are up to 64 locations away from the current instruction,
and they can only test an 8-bit bitfield. The JRSET and JRCLR operations allow jumps to anywhere in the
program address space and can specify a 16-bit mask.
; JRSET Operation — performed in two DSP56800E instructions
; JRCLR Operation — performed in two DSP56800E instructions
JRSET and JRCLR use the BFTSTH and BFTSTL instructions to perform the bitfield test. Thus, they can
use the same addressing modes as those bit-manipulation instructions.
7.5.4.2
The BRSET and BRCLR instructions are very useful, since they branch to a different address based on a
bitfield comparison. However, the design of these instructions is such that all the bits in the mask must
match the value being tested, or the branch is not taken. In some cases, it would be more useful to branch if
at least 1 bit in the mask matched. The BR1SET and BR1CLR operations provide just that functionality.
See Example 7-10.
; BR1SET Operation — performed in two DSP56800E instructions
; BR1CLR Operation — performed in two DSP56800E instructions
Freescale Semiconductor
Table 7-1. Operations Synthesized Using DSP56800E Instructions (Continued)
BFTSTH
JCS
BFTSTL
JCS
BFTSTL
BCC
BFTSTH
BCC
JRSET and JRCLR Operations
BR1SET and BR1CLR Operations
Operation
JR1CLR
JR1SET
None of these operations are actual DSP56800E instructions; they are
macros that can be created from existing instructions.
#MASK,X:<ea>
LABEL9
#MASK,X:<ea>
LABEL9
#MASK,X:<ea>
LABEL10
#MASK,X:<ea>
LABEL10
Example 7-10. BR1SET and BR1CLR Operations
Example 7-9. JRSET and JRCLR Operations
Jumps if at least 1 selected bit in bitfield is clear
Jumps if at least 1 selected bit in bitfield is set
Bit-Manipulation Unit
; 16-bit mask allowed
; 19- or 21-bit jump address allowed
; 16-bit mask allowed
; 19- or 21-bit jump address allowed
; 16-bit mask allowed
; 7-, 18-, 22-bit signed PC-relative offset
; allowed
; 16-bit mask allowed
; 7-, 18-, 22-bit signed PC-relative offset
; allowed
NOTE:
Description
Programming Considerations
7-9

Related parts for dsp56800e