head     56.3;
access   ;
symbols  ;
locks    ; strict;
comment  @# @;


56.3
date     93.01.27.13.58.39;  author jwh;  state Exp;
branches ;
next     56.2;

56.2
date     93.01.27.12.29.52;  author jwh;  state Exp;
branches ;
next     56.1;

56.1
date     91.11.07.12.31.48;  author jwh;  state Exp;
branches ;
next     1.1;

1.1
date     91.03.13.09.11.56;  author jwh;  state Exp;
branches ;
next     ;


desc
@@


56.3
log
@
pws2rcs automatic delta on Wed Jan 27 13:14:25 MST 1993
@
text
@*
*       x_unimp.sa 3.1 12/10/90
*
*       fpsp_unimp --- FPSP handler for unimplemented instruction
*       exception.
*
* Invoked when the user program encounters a floating-point
* op-code that hardware does not support.  Trap vector# 11
* (See table 8-1 MC68030 User's Manual).
*
*
* Note: An fsave for an unimplemented inst. will create a short
* fsave stack.
*
*  Input: 1. Six word stack frame for unimplemented inst, four word
*            for illegal
*            (See table 8-7 MC68030 User's Manual).
*         2. Unimp (short) fsave state frame created here by fsave
*            instruction.
*
*
*               Copyright (C) Motorola, Inc. 1990
*                       All Rights Reserved
*
*       THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
*       The copyright notice above does not evidence any
*       actual or intended publication of such source code.



	include fpsp_h

	refr    get_op
	refr    do_func
	refr    sto_res
	refr    gen_except
	refr    fpsp_fmt_error

	def     fpsp_unimp
	def     uni_2
fpsp_unimp    equ    *
	link            a6,#-LOCAL_SIZE
	fsave           -(a7)
uni_2    equ    *
	movem.l         d0-d1/a0-a1,USER_DA(a6)
	fmovem.x        fp0-fp3,USER_FP0(a6)
	fmovem.l        FPCONTROL/FPSTATUS/FPIADDR,USER_FPCONTROL(a6)
	move.b          (a7),d0         ;test for valid version num
	andi.b          #$f0,d0         ;test for $4x
	cmpi.b          #VER_4,d0       ;must be $4x or exit
	bne.l           fpsp_fmt_error
*
*       Temporary D25B Fix
*       The following lines are used to ensure that the FPSTATUS
*       exception byte and condition codes are clear before proceeding
*
	move.l          USER_FPSTATUS(a6),d0
	and.l           #$FF,d0 ;clear all but accrued exceptions
	move.l          d0,USER_FPSTATUS(a6)
	fmove.l         #0,FPSTATUS ;clear all user bits
	fmove.l         #0,FPCONTROL    ;clear all user exceptions for FPSP

	clr.b           UFLG_TMP(a6)    ;clr flag for unsupp data

	bsr.l           get_op          ;go get operand(s)
	clr.b           STORE_FLG(a6)
	bsr.l           do_func         ;do the function
	fsave           -(a7)           ;capture possible exc state
	tst.b           STORE_FLG(a6)
	bne.b           no_store        ;if STORE_FLG is set, no store
	bsr.l           sto_res         ;store the result in user space
no_store    equ    *
	bra.l           gen_except      ;post any exceptions and return

	end
@


56.2
log
@
pws2rcs automatic delta on Wed Jan 27 11:57:27 MST 1993
@
text
@d1 75
@


56.1
log
@Automatic bump of revision number for PWS version 3.25
@
text
@a0 75
*
*       x_unimp.sa 3.1 12/10/90
*
*       fpsp_unimp --- FPSP handler for unimplemented instruction
*       exception.
*
* Invoked when the user program encounters a floating-point
* op-code that hardware does not support.  Trap vector# 11
* (See table 8-1 MC68030 User's Manual).
*
*
* Note: An fsave for an unimplemented inst. will create a short
* fsave stack.
*
*  Input: 1. Six word stack frame for unimplemented inst, four word
*            for illegal
*            (See table 8-7 MC68030 User's Manual).
*         2. Unimp (short) fsave state frame created here by fsave
*            instruction.
*
*
*               Copyright (C) Motorola, Inc. 1990
*                       All Rights Reserved
*
*       THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
*       The copyright notice above does not evidence any
*       actual or intended publication of such source code.



	include fpsp_h

	refr    get_op
	refr    do_func
	refr    sto_res
	refr    gen_except
	refr    fpsp_fmt_error

	def     fpsp_unimp
	def     uni_2
fpsp_unimp    equ    *
	link            a6,#-LOCAL_SIZE
	fsave           -(a7)
uni_2    equ    *
	movem.l         d0-d1/a0-a1,USER_DA(a6)
	fmovem.x        fp0-fp3,USER_FP0(a6)
	fmovem.l        FPCONTROL/FPSTATUS/FPIADDR,USER_FPCONTROL(a6)
	move.b          (a7),d0         ;test for valid version num
	andi.b          #$f0,d0         ;test for $4x
	cmpi.b          #VER_4,d0       ;must be $4x or exit
	bne.l           fpsp_fmt_error
*
*       Temporary D25B Fix
*       The following lines are used to ensure that the FPSTATUS
*       exception byte and condition codes are clear before proceeding
*
	move.l          USER_FPSTATUS(a6),d0
	and.l           #$FF,d0 ;clear all but accrued exceptions
	move.l          d0,USER_FPSTATUS(a6)
	fmove.l         #0,FPSTATUS ;clear all user bits
	fmove.l         #0,FPCONTROL    ;clear all user exceptions for FPSP

	clr.b           UFLG_TMP(a6)    ;clr flag for unsupp data

	bsr.l           get_op          ;go get operand(s)
	clr.b           STORE_FLG(a6)
	bsr.l           do_func         ;do the function
	fsave           -(a7)           ;capture possible exc state
	tst.b           STORE_FLG(a6)
	bne.b           no_store        ;if STORE_FLG is set, no store
	bsr.l           sto_res         ;store the result in user space
no_store    equ    *
	bra.l           gen_except      ;post any exceptions and return

	end
@


1.1
log
@Initial revision
@
text
@@
