English
Language : 

SH7065 Datasheet, PDF (196/941 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperH RISC engine Family/SH7000 Series
Section 5 Exception Handling
5.6.3 Instructions in Repeat Loops
If a repeat loop comprises up to three instructions, neither exceptions nor interrupts are accepted.
If a repeat loop contains four or more instructions, neither exceptions nor interrupts are accepted
during the execution cycle of the first instruction or the last three instructions. If a repeat loop
contains four or more instructions, address errors only are accepted during the execution cycle of
the fourth from last instruction. For more information, see the SH-1/SH-2/SH-DSP Software
Manual.
A. All interrupts and address errors are accepted.
B. Address errors only are accepted.
C. No interrupts or address errors are accepted.
When RC > = 1;
Operation depends on the number of instructions in the repeat loop, as follows.
1. One instruction
←A
instr0 ← B
Start (End): instr1 ← C
instr2
←A
2. Two instructions
←A
instr0 ← B
Start: instr1 ← C
End: instr2
←C
instr3
←A
3. Three instructions
←A
instr0 ← B
Start: instr1 ← C
instr2
←C
End: instr3
←C
instr4
←A
4. Four instructions
instr0
Start: instr1
instr2
instr3
End: instr4
instr5
←A
← A or C*1
←B
←C
←C
←C
←A
Notes: 1. On return from instr 4
2. On return from instr n
5. Five or more instructions
←A
instr0 ← A or C*2
Start: instr1
←A
:
:
:
←A
instr n-3 ← B
instr n-2 ← C
instr n-1 ← C
End: instr n ← C
instr n+1 ← A
When RC = 0;
All interrupts and address errors are accepted.
Figure 5.1 Restrictions on Interrupt Acceptance in Repeat Mode
Rev. 5.00 Sep 11, 2006 page 174 of 916
REJ09B0332-0500