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

#include "global.h"

	.file "sf_fpu_e.s"


 #
 # 

save_user_float__::
	spr	fsr, r0
	stord	r0, _save_FS__
	spr	ftrl, r0
	stord   r0,  _save_FTRL__
	spr	ftrh, r0
	stord   r0,  _save_FTRH__
	storf	f0, _save_F0__	
	storf	f1, _save_F1__
	storf	f2, _save_F2__
	storf	f3, _save_F3__
	storf	f4, _save_F4__
	storf	f5, _save_F5__
	storf	f6, _save_F6__
	storf	f7, _save_F7__
	storf	f8, _save_F8__
	storf	f9, _save_F9__
	storf	f10, _save_F10__
	storf	f11, _save_F11__
	storf	f12, _save_F12__
	storf	f13, _save_F13__
	storf	f14, _save_F14__
	storf	f15, _save_F15__
	storf	f16, _save_F16__
	storf	f17, _save_F17__
	storf	f18, _save_F18__
	storf	f19, _save_F19__
	storf	f20, _save_F20__
	storf	f21, _save_F21__
	storf	f22, _save_F22__
	storf	f23, _save_F23__
	storf	f24, _save_F24__
	storf	f25, _save_F25__
	storf	f26, _save_F26__
	storf	f27, _save_F27__
	storf	f28, _save_F28__
	storf	f29, _save_F29__
	storf	f30, _save_F30__
	storf	f31, _save_F31__
	
	jump	r15



restore_user_float__::
	loadf	_save_F0__, f0
	loadf	_save_F1__, f1
	loadf	_save_F2__, f2
	loadf	_save_F3__, f3
	loadf	_save_F4__, f4
	loadf	_save_F5__, f5
	loadf	_save_F6__, f6
	loadf	_save_F7__, f7
	loadf	_save_F8__, f8
	loadf	_save_F9__, f9
	loadf	_save_F10__, f10
	loadf	_save_F11__, f11
	loadf	_save_F12__, f12
	loadf	_save_F13__, f13
	loadf	_save_F14__, f14
	loadf	_save_F15__, f15
	loadf	_save_F16__, f16
	loadf	_save_F17__, f17
	loadf	_save_F18__, f18
	loadf	_save_F19__, f19
	loadf	_save_F20__, f20
	loadf	_save_F21__, f21
	loadf	_save_F22__, f22
	loadf	_save_F23__, f23
	loadf	_save_F24__, f24
	loadf	_save_F25__, f25
	loadf	_save_F26__, f26
	loadf	_save_F27__, f27
	loadf	_save_F28__, f28
	loadf	_save_F29__, f29
	loadf	_save_F30__, f30
	loadf	_save_F31__, f31
	loadd	_save_FTRL__, r0
	lpr	r0 , ftrl
	loadd	_save_FTRH__, r0
	lpr	r0 , ftrh
	loadd	_save_FS__, r0
	lpr	r0 , fsr
	
	jump	r15


	.align 8
