 #*****************************************************************************
 #
 #                                  fpu_ext
 #
 # This module contains the assemly routines for the FPU driver.
 #
 # Note that comment lines must begin with a blank so cpp will not regard 
 # them.
 #
 # History:
 #   +----------+------------+------------------------------------------------+
 #   |   Date   |     by     |     Description                                |
 #   +----------+------------+------------------------------------------------+
 #   |          | Coby       | Written                                        |
 #   +----------+------------+------------------------------------------------+
 #
 #*****************************************************************************


	.file	"fpu_e.s"

#include "global.h"

#if (FPU_TYPE != NOFPU)
#ifndef public

extern void		get_F0__(/*addr*/);
extern void		get_F1__(/*addr*/);
extern void		get_F2__(/*addr*/);
extern void		get_F3__(/*addr*/);
extern void		get_F4__(/*addr*/);
extern void		get_F5__(/*addr*/);
extern void		get_F6__(/*addr*/);
extern void		get_F7__(/*addr*/);
extern void		get_L0__(/*addr*/);
extern void		get_L2__(/*addr*/);
extern void		get_L4__(/*addr*/);
extern void		get_L6__(/*addr*/);
extern void		get_L1__(/*addr*/);
extern void		get_L3__(/*addr*/);
extern void		get_L5__(/*addr*/);
extern void		get_L7__(/*addr*/);
extern void		get_fsr__(/*addr*/);
extern void		mod_F0__(/*addr*/);
extern void		mod_F1__(/*addr*/);
extern void		mod_F2__(/*addr*/);
extern void		mod_F3__(/*addr*/);
extern void		mod_F4__(/*addr*/);
extern void		mod_F5__(/*addr*/);
extern void		mod_F6__(/*addr*/);
extern void		mod_F7__(/*addr*/);
extern void		mod_L0__(/*addr*/);
extern void		mod_L2__(/*addr*/);
extern void		mod_L4__(/*addr*/);
extern void		mod_L6__(/*addr*/);
extern void		mod_L1__(/*addr*/);
extern void		mod_L3__(/*addr*/);
extern void		mod_L5__(/*addr*/);
extern void		mod_L7__(/*addr*/);
extern void		mod_fsr__(/*addr*/);


#endif


    .udata
    .bss    tmp_fsr, 4, 4
    .text


_get_F0__::
	sfsr	tmp_fsr
	movf	f0, 0(4(sp))
	lfsr	tmp_fsr
	ret	0

_get_F1__::
	sfsr	tmp_fsr
	movf	f1, 0(4(sp))
	lfsr	tmp_fsr
	ret	0

_get_F2__::
	sfsr	tmp_fsr
	movf	f2, 0(4(sp))
	lfsr	tmp_fsr
	ret	0

_get_F3__::
	sfsr	tmp_fsr
	movf	f3, 0(4(sp))
	lfsr	tmp_fsr
	ret	0

_get_F4__::
	sfsr	tmp_fsr
	movf	f4, 0(4(sp))
	lfsr	tmp_fsr
	ret	0

_get_F5__::
	sfsr	tmp_fsr
	movf	f5, 0(4(sp))
	lfsr	tmp_fsr
	ret	0

_get_F6__::
	sfsr	tmp_fsr
	movf	f6, 0(4(sp))
	lfsr	tmp_fsr
	ret	0

_get_F7__::
	sfsr	tmp_fsr
	movf	f7, 0(4(sp))
	lfsr	tmp_fsr
	ret	0

_get_L0__::
	sfsr	tmp_fsr
	movl	l0, 0(4(sp))
	lfsr	tmp_fsr
	ret	0

_get_L2__::
	sfsr	tmp_fsr
	movl	l2, 0(4(sp))
	lfsr	tmp_fsr
	ret	0

_get_L4__::
	sfsr	tmp_fsr
	movl	l4, 0(4(sp))
	lfsr	tmp_fsr
	ret	0

_get_L6__::
	sfsr	tmp_fsr
	movl	l6, 0(4(sp))
	lfsr	tmp_fsr
	ret	0


#if (FPU_TYPE == NS32381)


_get_L1__::
	sfsr	tmp_fsr
	movl	l1, 0(4(sp))
	lfsr	tmp_fsr
	ret	0

_get_L3__::
	sfsr	tmp_fsr
	movl	l3, 0(4(sp))
	lfsr	tmp_fsr
	ret	0

_get_L5__::
	sfsr	tmp_fsr
	movl	l5, 0(4(sp))
	lfsr	tmp_fsr
	ret	0

_get_L7__::
	sfsr	tmp_fsr
	movl	l7, 0(4(sp))
	lfsr	tmp_fsr
	ret	0


#endif

_get_fsr__::
	sfsr	0(4(sp))
	ret	0


_mod_F0__::
	sfsr	tmp_fsr
	movf	 0(4(sp)), f0
	lfsr	tmp_fsr
	ret	0

_mod_F1__::
	sfsr	tmp_fsr
	movf	 0(4(sp)), f1
	lfsr	tmp_fsr
	ret	0

_mod_F2__::
	sfsr	tmp_fsr
	movf	 0(4(sp)), f2
	lfsr	tmp_fsr
	ret	0

_mod_F3__::
	sfsr	tmp_fsr
	movf	 0(4(sp)), f3
	lfsr	tmp_fsr
	ret	0

_mod_F4__::
	sfsr	tmp_fsr
	movf	 0(4(sp)), f4
	lfsr	tmp_fsr
	ret	0

_mod_F5__::
	sfsr	tmp_fsr
	movf	 0(4(sp)), f5
	lfsr	tmp_fsr
	ret	0

_mod_F6__::
	sfsr	tmp_fsr
	movf	 0(4(sp)), f6
	lfsr	tmp_fsr
	ret	0

_mod_F7__::
	sfsr	tmp_fsr
	movf	 0(4(sp)), f7
	lfsr	tmp_fsr
	ret	0

_mod_L0__::
	sfsr	tmp_fsr
	movl	0(4(sp)),l0
	lfsr	tmp_fsr
	ret	0

_mod_L2__::
	sfsr	tmp_fsr
	movl	0(4(sp)),l2
	lfsr	tmp_fsr
	ret	0

_mod_L4__::
	sfsr	tmp_fsr
	movl	0(4(sp)),l4
	lfsr	tmp_fsr
	ret	0

_mod_L6__::
	sfsr	tmp_fsr
	movl	0(4(sp)),l6
	lfsr	tmp_fsr
	ret	0


#if (FPU_TYPE == NS32381)


_mod_L1__::
	sfsr	tmp_fsr
	movl	0(4(sp)),l1
	lfsr	tmp_fsr
	ret	0

_mod_L3__::
	sfsr	tmp_fsr
	movl	0(4(sp)),l3
	lfsr	tmp_fsr
	ret	0

_mod_L5__::
	sfsr	tmp_fsr
	movl	0(4(sp)),l5
	lfsr	tmp_fsr
	ret	0

_mod_L7__::
	sfsr	tmp_fsr
	movl	0(4(sp)),l7
	lfsr	tmp_fsr
	ret	0


#endif

_mod_fsr__::
	lfsr	0(4(sp))
	ret	0

#endif /* NOFPU */

