Static Programming Rules

Rule SR.3

At least one VLES is required between a MOVE-like instruction that writes the SR register and the following instructions that affect status bits in SR:

DI and EI

DOENn and DOENSHn

CONT/D, BREAK, and SKIPLS

Example 7-44. SR Write to SR Status Bit Update

move.l

#<1,sr

; not allowed

di

 

bmclr

#$ffff,sr.h

; not allowed

doen0

#<10

pop

sr

; not allowed

cont

_next

Rule SR.4

At least two VLES are required between an instruction that affects the DOVF status bit in EMR and a MOVE-like instruction that reads or writes the EMR register.

The assembler-mapped instruction CLR Dn never affects the DOVF status bit, even though it is implemented as SUB Da,Da,Dn. Therefore, this rule applies to the SUB instruction, but not to CLR (SUB Da,Da,Dn is taken as CLR in this context).

7-26

SC140 DSP Core Reference Manual

Page 276
Image 276
Freescale Semiconductor SC140 specifications Rule SR.3, Rule SR.4, Example 7-44. SR Write to SR Status Bit Update