Condition Match Flag Setting; Program Counter (Pc) Value Saved - Hitachi SH7751 Hardware Manual

Superh risc engine
Table of Contents

Advertisement

20.3.6

Condition Match Flag Setting

1. Instruction access with post-execution condition, or operand access
The flag is set when execution of the instruction that causes the break is completed. As an
exception to this, however, in the case of an instruction with more than one operand access the
flag may be set on detection of the match condition alone, without waiting for execution of the
instruction to be completed.
Example 1:
100 BT L200 (branch performed)
102 Instruction (operand access break on channel A)
Example 2:
110 FADD (FPU exception)
112 Instruction (operand access break on channel A)
2. Instruction access with pre-execution condition
The flag is set when the break match condition is detected.
Example 1:
110 Instruction (pre-execution break on channel A)
112 Instruction (pre-execution break on channel B)
Example 2:
110 Instruction (pre-execution break on channel B, instruction access TLB miss)
20.3.7

Program Counter (PC) Value Saved

1. When instruction access (pre-execution) is set as a break condition, the program counter (PC)
value saved to SPC in user break interrupt handling is the address of the instruction at which
the break condition match occurred. In this case, a user break interrupt is generated and the
fetched instruction is not executed.
2. When instruction access (post-execution) is set as a break condition, the program counter (PC)
value saved to SPC in user break interrupt handling is the address of the instruction to be
executed after the instruction at which the break condition match occurred. In this case, the
fetched instruction is executed, and a user break interrupt is generated before execution of the
next instruction.
3. When an instruction access (post-execution) break condition is set for a delayed branch
instruction, the delay slot instruction is executed and a user break is effected before execution
of the instruction at the branch destination (when the branch is made) or the instruction two
instructions ahead of the branch instruction (when the branch is not made). In this case, the PC
value saved to SPC is the address of the branch destination (when the branch is made) or the
instruction following the delay slot instruction (when the branch is not made).
Rev. 3.0, 04/02, page 768 of 1064

flag not set

flag not set

flag set

flag not set

flag set

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sh7751r

Table of Contents