Static Programming Rules
SC140 DSP Core Reference Manual
7-9
Rule G.G.4
Instructions grouped in a VLES cannot write to the same register or affect the same status bit.
For mutually exclusive IFc subgroups in a VLES, this rule applies independently to each subgroup unless
explicitly stated.
The less obvious cases are:
•
Multiple COF instructions that implicitly write the PC register cannot be grouped in a VLES. This
case applies to the whole VLES, independent of the T bit state.
Example 7-5 Duplicate PC Destinations
jmp _lbl3
bsr _lbl6
;not allowed
bt _label1
bf _label2
;not allowed
btd _label1
bfd _label2
;not allowed
jt r1
jf r2
;not allowed
jtd r1
jfd r2
;not allowed
ift bra _label1
iff bra _label2
;not allowed
ift brad _label1
iff brad _label2
;not allowed
ift jmp r1
iff jmp r2
;not allowed
ift jmpd r1
iff jmpd r2
;not allowed
ift jmp r0
iff rts
;not allowed
ift bra _label1
iff rts
;not allowed
ift bra _label1
iff break
;not allowed
ift jmp r1
ifa jf r2
;not allowed
ift bra _label1
iff brad _label2
;not allowed
ift jmpd r1
iff jmp r2
;not allowed
•
Multiple writes of the same address pointer register Rn cannot be grouped in a VLES. The no update
addressing mode (Rn) is not considered an address register write.
Example 7-6 Duplicate Address Pointer Register Destinations
move.w (r0)+,d0
move.w d1,(r0)+
;not allowed
move.w (r0)+,r0
;not allowed
move.l d0,r0
move.l (r0)+,d1
;not allowed
move.l d0,r8
move.l d1,b0
;not allowed - B register alias
pop r0
move.l (r0)+,d0
;not allowed
move.w (r0+$6),r0
;allowed - no update mode
move.w (r0+n0),r0
;allowed - no update mode
move.w (r0),r0
;allowed - no update mode
move.w (r0),d0
move.w (r0)+,d1
;allowed - no update mode
•
Multiple writes of the ESP or NSP stack pointer registers (implicitly using SP and OSP) cannot be
grouped in a VLES. This rule applies independent of the EXP status bit.
Example 7-7 Duplicate Stack Pointer Destinations
pop d2
rts
;not allowed
pushn d0
tfra r1,osp
;not allowed
pop d1
tfra r0,sp
;not allowed
tfra r0,sp
tfra r1,osp
;allowed - writes different regs.
•
Multiple instructions that write different portions of the same register cannot be grouped in a VLES.
Содержание SC140 DSP Core
Страница 12: ...xii SC140 DSP Core Reference Manual ...
Страница 18: ...xviii SC140 DSP Core Reference Manual ...
Страница 32: ...1 6 SC140 DSP Core Reference Manual Core Architecture Features ...
Страница 180: ...4 70 SC140 DSP Core Reference Manual Trace Unit Registers ...
Страница 250: ...6 70 SC140 DSP Core Reference Manual Programming Rules ...
Страница 314: ...7 64 SC140 DSP Core Reference Manual NOP Definition ...
Страница 385: ...BMCHG W SC140 DSP Core Reference Manual A 71 u16 iiiiiiiiiiiiiiii 16 bit unsigned immediate data ...
Страница 388: ...A 74 SC140 DSP Core Reference Manual BMCHG W s16 AAAAAAAAAAAAAAAA 16 bit signed SP address offset ...
Страница 391: ...BMCLR SC140 DSP Core Reference Manual A 77 u16 iiiiiiiiiiiiiiii 16 bit unsigned immediate data ...
Страница 454: ...A 140 SC140 DSP Core Reference Manual DECA u5 iiiii 5 bit unsigned immediate data 1 set by the assembler ...
Страница 463: ...DI SC140 DSP Core Reference Manual A 149 15 8 7 0 DI 1 1 4 1 0 0 1 1 1 1 1 0 1 1 1 1 1 0 1 ...
Страница 478: ...A 164 SC140 DSP Core Reference Manual EI ...
Страница 592: ...A 278 SC140 DSP Core Reference Manual MOVE L a32 aaaaaaaaaaaaaaaaAAAAAAAAAAAAAAAA 32 bit absolute long address ...
Страница 618: ...A 304 SC140 DSP Core Reference Manual MOVES 4F s15 sssssssssssssss Signed 15 bit offset ...
Страница 638: ...A 324 SC140 DSP Core Reference Manual MPYR ...
Страница 660: ...A 346 SC140 DSP Core Reference Manual OR W s16 AAAAAAAAAAAAAAAA Signed 16 bit SP address offset ...
Страница 746: ...A 432 SC140 DSP Core Reference Manual ZXTA x ...
Страница 758: ...I 10 Index ...
Страница 759: ...SC140 DSP Core Reference Manual i ...
Страница 760: ......