| to handle the exception.
|
| If the exception was completely handled by the package, then
-| the return will be via a 'jmp fpsp_done'. Unless there is
+| the return will be via a 'jmp fpsp_done'. Unless there is
| OS specific work to be done (such as handling a context switch or
| interrupt) the user program can be resumed via 'rte'.
|
| In the following skeleton code, some typical 'real_xxxx' handling
| code is shown. This code may need to be moved to an appropriate
| place in the target system, or rewritten.
-|
+|
| Copyright (C) Motorola, Inc. 1990
| All Rights Reserved
|
-| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
-| The copyright notice above does not evidence any
+| THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
+| The copyright notice above does not evidence any
| actual or intended publication of such source code.
|
|
|section 8
-
+
#include "fpsp.h"
|xref b1238_fix
SAVE_ALL_INT
GET_CURRENT(%d0)
- movel %sp,%sp@- | stack frame pointer argument
+ movel %sp,%sp@- | stack frame pointer argument
bsrl trap_c
addql #4,%sp
bral ret_from_exception
|
| All inexact exceptions are real, but the 'real' handler
| will probably want to clear the pending exception.
-| The provided code will clear the E3 exception (if pending),
+| The provided code will clear the E3 exception (if pending),
| otherwise clear the E1 exception. The frestore is not really
| necessary for E1 exceptions.
|
| to the appropriate handler for the exception in the fpsr. Note
| that this fix is only for d43b parts, and is skipped if the
| version number is not $40.
-|
+|
|
.global real_inex
.global inex
bra snan
inex_ckofl:
btstb #ovfl_bit,2(%sp) |test for ovfl
- beq inex_ckufl
+ beq inex_ckufl
addl #4,%sp
frestore (%sp)+
unlk %a6
SAVE_ALL_INT
GET_CURRENT(%d0)
- movel %sp,%sp@- | stack frame pointer argument
+ movel %sp,%sp@- | stack frame pointer argument
bsrl trap_c
addql #4,%sp
bral ret_from_exception
-
+
|
| Overflow exception
|
SAVE_ALL_INT
GET_CURRENT(%d0)
- movel %sp,%sp@- | stack frame pointer argument
+ movel %sp,%sp@- | stack frame pointer argument
bsrl trap_c
addql #4,%sp
bral ret_from_exception
-
+
|
| Underflow exception
|
SAVE_ALL_INT
GET_CURRENT(%d0)
- movel %sp,%sp@- | stack frame pointer argument
+ movel %sp,%sp@- | stack frame pointer argument
bsrl trap_c
addql #4,%sp
bral ret_from_exception
-
+
|
| Signalling NAN exception
|
SAVE_ALL_INT
GET_CURRENT(%d0)
- movel %sp,%sp@- | stack frame pointer argument
+ movel %sp,%sp@- | stack frame pointer argument
bsrl trap_c
addql #4,%sp
bral ret_from_exception
-
+
|
| Operand Error exception
|
SAVE_ALL_INT
GET_CURRENT(%d0)
- movel %sp,%sp@- | stack frame pointer argument
+ movel %sp,%sp@- | stack frame pointer argument
bsrl trap_c
addql #4,%sp
bral ret_from_exception
-
+
|
| BSUN exception
|
SAVE_ALL_INT
GET_CURRENT(%d0)
- movel %sp,%sp@- | stack frame pointer argument
+ movel %sp,%sp@- | stack frame pointer argument
bsrl trap_c
addql #4,%sp
bral ret_from_exception
|
| F-line exception
|
-| A 'real' F-line exception is one that the FPSP isn't supposed to
+| A 'real' F-line exception is one that the FPSP isn't supposed to
| handle. E.g. an instruction with a co-processor ID that is not 1.
|
|
SAVE_ALL_INT
GET_CURRENT(%d0)
- movel %sp,%sp@- | stack frame pointer argument
+ movel %sp,%sp@- | stack frame pointer argument
bsrl trap_c
addql #4,%sp
bral ret_from_exception
SAVE_ALL_INT
GET_CURRENT(%d0)
- movel %sp,%sp@- | stack frame pointer argument
+ movel %sp,%sp@- | stack frame pointer argument
bsrl trap_c
addql #4,%sp
bral ret_from_exception
| {4028, 4130} - unimp frame
| {4000, 4100} - idle frame
|
-| This entry point simply holds an f-line illegal value.
+| This entry point simply holds an f-line illegal value.
| Replace this with a call to your kernel panic code or
| code to handle future revisions of the fpu.
|
.global fpsp_fmt_error
fpsp_fmt_error:
- .long 0xf27f0000 |f-line illegal
+ .long 0xf27f0000 |f-line illegal
|
| fpsp_done --- FPSP exit point
| a1 - supervisor destination address
| d0 - number of bytes to read (maximum count is 12)
|
-| Like mem_write, mem_read always reads with a supervisor
+| Like mem_write, mem_read always reads with a supervisor
| destination address on the supervisor stack. Also like mem_write,
| the EXC_SR is checked and a simple memory copy is done if reading
| from supervisor space is indicated.