Fujitsu FR81 Computer Hardware User Manual


 
FR81 Family
48 FUJITSU MICROELECTRONICS LIMITED CM71-00105-1E
CHAPTER 4 RESET AND "EIT" PROCESSING
4.4
4.4 Exception Processing
Exceptions originate when there is a problem in the instruction sequence. Exceptions
are processed by first saving the necessary information to resume the currently
executing instruction, and then starting the processing routine corresponding to the
type of exception that has occurred.
Branching to the exception processing routine takes place before execution of the instruction that has
caused the exception. The address of the instruction in which the exception occurs becomes the program
counter (PC) value that is saved to the stack at the time of occurrence of the exception.
The following factors can cause occurrence of an exception:
Invalid instruction exception
Instruction access protection violation exception
Data access protection violation exception
FPU exception
Instruction break
Guarded access break
4.4.1 Invalid Instruction Exception
An invalid instruction exception occurs when an invalid instruction is being executed. The following
sources can cause the invalid instruction exception.
Executing an undefined instruction code.
Executing on delay slot an instruction that cannot be placed on the delay slot.
Writing to a system-dedicated register (TBR, SSP, or ESR) in user mode (with MOV or LD instruction).
Executing a privilege instruction (RETI or STILM) in user mode.
Executing a floating point instruction while FPU is absent.
Occurrence of a bus error during instruction fetch.
Occurrence of a bus error or violation of system register access during data access to a buffer-disabled
area.
The following operations are performed if an invalid-instruction exception is accepted.
1. Transition to privilege mode is carried out, and the stack flag (S) is cleared.
"0" UM "0" S
2. Contents of program status (PS) are saved to the system stack.
SSP - 4 SSP PS (SSP)
3. Contents of the program counter (PC) of an exception source instruction are saved to the system stack.
SSP - 4 SSP PC (SSP)