ADSP-2126x SHARC Processor Hardware Reference
3-11
Program Sequencer
Branches and Sequencing
One type of nonsequential program flow that the sequencer supports is
branching. A branch occurs when a
JUMP
or
CALL
/
RETURN
instruction
moves execution to a location other than the next sequential address. For
descriptions on how to use
JUMP
and
CALL
/
RETURN
instructions, see
SHARC
Processor Programming Reference
. Briefly, these instructions operate as
follows.
• A
JUMP
or a
CALL
instruction transfers program flow to another
memory location. The difference between a
JUMP
and a
CALL
is that
a
CALL
automatically pushes the return address (the next sequential
address after the
CALL
instruction) onto the PC stack. This push
makes the address available for the
CALL
instruction’s matching
return from an
RTS
subroutine instruction.
• A
RETURN
instruction causes the sequencer to fetch the instruction
at the return address, which is stored at the top of the PC stack.
The two types of return instructions are return from subroutine
(
RTS
) and return from interrupt (
RTI
). While the
RTS
only pops the
return address off the PC stack, the
RTI
pops the return address
and:
1. Clears the interrupt’s bit in the interrupt latch register (
IRPTL
) and
allows another interrupt to be latched in the
IRPTL
register and the
interrupt mask pointer (
IMASKP
) register. See
...
0x021F
rts;
Table 3-1. Cache Inefficient Code (Cont’d)
Address
Instruction
Содержание ADSP-21261 SHARC
Страница 30: ...Contents xxx ADSP 2126x SHARC Processor Hardware Reference ...
Страница 40: ...Register Diagram Conventions xl ADSP 2126x SHARC Processor Hardware Reference ...
Страница 58: ...Differences From Previous SHARCs 1 18 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 112: ...Secondary Processing Element PEy 2 54 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 178: ...Summary 3 66 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 204: ...DAG Instruction Summary 4 26 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 322: ...Setting Up DMA 7 32 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 436: ...SPORT Programming Examples 9 86 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 521: ...ADSP 2126x SHARC Processor Hardware Reference 11 31 Input Data Port rts IDP_ISR end ...
Страница 522: ...Input Data Port Programming Example 11 32 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 590: ...Timer Programming Examples 14 20 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 796: ...I O Processor Registers A 174 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 800: ...B 4 ADSP 2126x SHARC Processor Core Manual ...
Страница 846: ...Index I 36 ADSP 2126x SHARC Processor Hardware Reference ...