EasyManua.ls Logo

Freescale Semiconductor MC68881 - Page 252

Default Icon
409 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6
user privilege level results in the MPU taking a pre-instruction exception using the privilege
violation vector number.
6.2.8 Format Error Exceptions
When the FRESTORE instruction is executed, the FPCP checks the validity of the format
word written to the restore CIR by the MPU. Refer to 6.4.2 State Frames for information
on the format word. The FPCP returns an invalid format word ($02XX) in the restore CIR
when the format word from MPU is not valid. The MPU then takes a pre-instruction ex-
ception using the format error vector number. Refer to 7.5.4.7 FORMAT EXCEPTION, FRES-
TORE INSTRUCTION for further information on the FRESTORE format error exception.
When an FSAVE instruction is initiated while the FPCP is executing a previous FSAVE or
FRESTORE instruction, the FPCP returns an invalid format word ($02XX) in the save CIR.
The MPU then takes a pre-instruction exception using the format error vector number.
Refer to 7.5.4.6 FORMAT EXCEPTION, FSAVE INSTRUCTION for further information on the
FSAVE format error exception.
6.3 MC68882 EXCEPTION HANDLERS
MC68882 exception handlers can be derived by modifying existing MC68881 handlers. The
required modifications are discussed in 5.2.2 Exception Handler Code. Note that if the
guidelines in the referenced text are met, the resulting MC68882 handlers can be used with
no adverse effects for systems that use the MC68881. Since the MC68882 is pin-compatible
and user-software-compatible with the MC68881, the exception handlers can be written to
meet the system software requirements of both the MC68881 and the MC68882. When this
is done, systems that only use the MC68881 at present can replace the MC68881 with the
MC68882 using the same socket, without changing either applications or systems software.
6.4 CONTEXT SWITCHING
In most types of multitasking systems, it is often necessaryto take control from one program
and give control to another program. This requires the operating system to extract (from
the FPCP) data corresponding to one program context and load the context corresponding
to the next program to be executed. The information that must be exchanged is divided
into two categories:
1. Programmer's model consists of data accessible by the programmer using nonpri-
vileged instructions. This data is saved and restored using the FMOVEM instructions.
2.
Internal state consists of various internal flags and registers that are vital in restoring
the FPCP to the proper state. The application program need not be concerned with
the internal state. These internal flags and registers are accessed by the privileged
FSAVE and FRESTORE instructions.
The following paragraphs describe how this context information is manipulated.
FREESCALE
6-28
MC68881/MC68882 USER'S MANUAL

Table of Contents

Related product manuals