Rev. 3.0, 04/02, page 116 of 1064
4.7.6
SQ Usage Notes
If an exception occurs within the three instructions preceding an instruction that writes to an SQ in
the SH7751, a branch may be made to the exception handling routine after execution of the SQ
write that should be suppressed when an exception occurs.
This may be due to the bug described in (1) or (2) below.
(1) When SQ data is transferred to external memory within a normal program
If a PREF instruction for transfer from an SQ to external memory is included in the three
instructions preceding an SQ store instruction, the SQ is updated because the SQ write that
should be suppressed when a branch is made to the exception handling routine is executed, and
after returning from the exception handling routine the execution order of the PREF instruction
and SQ store instruction is reversed, so that erroneous data may be transferred to external
memory.
(2) When SQ data is transferred to external memory in an exception handling routine
If store queue contents are transferred to external memory within an exception handling
routine, erroneous data may be transferred to external memory.
Example 1: When an SQ store instruction is executed after a PREF instruction for transfer from that same SQ
to external memory
PREF instruction
; PREF instruction for transfer from SQ to external memory
; Address of this instruction is saved to SPC when exception occurs.
; Instruction 1, instruction 2, or instruction 3 may be executed on return from exception handling routine.
Instruction 1 ; May be executed if an SQ store instruction.
Instruction 2 ; May be executed if an SQ store instruction.
Instruction 3 ; May be executed if an SQ store instruction.
Instruction 4 ; Not executed even if an SQ store instruction.
Example 2: When an instruction at which an exception occurs is a branch instruction and a branch is made
Instruction 1 (branch instruction) ; Address of this instruction is saved to SPC when exception occurs.
Instruction 2
; May be executed if an instruction 1 delay slot instruction and an SQ store instruction.
Instruction 3
Instruction 4
Instruction 5
Instruction 6
Instruction 7 (instruction 1 branch destination)
; May be executed if an SQ store instruction.
Instruction 8
; May be executed if an SQ store instruction.
Summary of Contents for SH7751
Page 39: ...Rev 3 0 04 02 page xxxviii of xxxviii ...
Page 89: ...Rev 3 0 04 02 page 50 of 1064 ...
Page 157: ...Rev 3 0 04 02 page 118 of 1064 ...
Page 193: ...Rev 3 0 04 02 page 154 of 1064 ...
Page 225: ...Rev 3 0 04 02 page 186 of 1064 ...
Page 253: ...Rev 3 0 04 02 page 214 of 1064 ...
Page 301: ...Rev 3 0 04 02 page 262 of 1064 ...
Page 343: ...Rev 3 0 04 02 page 304 of 1064 ...
Page 607: ...Rev 3 0 04 02 page 568 of 1064 ...
Page 671: ...Rev 3 0 04 02 page 632 of 1064 ...
Page 745: ...Rev 3 0 04 02 page 706 of 1064 ...
Page 767: ...Rev 3 0 04 02 page 728 of 1064 ...
Page 1061: ...Rev 3 0 04 02 page 1022 of 1064 NMI tNMIL tNMIH Figure 23 69 NMI Input Timing ...
Page 1069: ...Rev 3 0 04 02 page 1030 of 1064 ...
Page 1103: ...Rev 3 0 04 02 page 1064 of 1064 ...