ASP
6-52
ASP
Align Stack Pointer
SYNTAX OPTIONS
OPCODE
OBJMODE
RPT
CYC
ASP
0111 0110 0001 1011
X
−
1
Operands
None
Description
Ensure that the stack pointer (SP) is aligned to an even address. If the least
significant bit of SP is 1, SP points to an odd address and must be moved by
incrementing SP by 1. The SPA bit is set as a record of this alignment. If
instead the ASP instruction finds that the SP already points to an even
address, SP is left unchanged and the SPA bit is cleared to indicate that no
alignment has taken place. In either case, the change to the SPA bit is made in
the decode 2 phase of the pipeline.
if(SP = odd)
SP = SP + 1;
SPA = 1;else
SPA = 0;
If you wish to undo a previous alignment by the ASP instruction, use the NASP
instruction.
Flags and
Modes
SPA
If SP holds an odd address before the operation, SPA is set; otherwise, SPA is
cleared.
Repeat
This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
Example
; Alignment of stack pointer in interrupt service routine:
; Vector table:
INTx: .long INTxService
; INTx interrupt vector
.
.
INTxService:
ASP
; Align stack pointer
.
.
.
NASP
; Re-align stack pointer
IRET
; Return from interrupt.
Содержание TMS320C28x
Страница 30: ...1 12...
Страница 80: ...This page intentionally left blank 2 50 This page intentionally left blank...
Страница 269: ...IN loc16 PA 6 112 MOV AL 0 AL 0 UOUT IORegC AL IOspace IORegC AL 10...
Страница 308: ...MAXCUL P loc32 6 151 Saturate MOVL Var64 2 ACC Store result into Var64 MOVL Var64 P...
Страница 509: ...SUBL ACC P PM 6 352 SUBL ACC P PM ACC S B 11 M X 4 MOVH Y ACC 5 Store Q15 result into Y...
Страница 585: ...This page intentionally left blank 7 32 This page intentionally left blank...