xref: /csrg-svn/sys/tahoe/align/Acvfl.c (revision 45760)
1*45760Sbostic /*-
2*45760Sbostic  * Copyright (c) 1986 The Regents of the University of California.
3*45760Sbostic  * All rights reserved.
4*45760Sbostic  *
5*45760Sbostic  * This code is derived from software contributed to Berkeley by
6*45760Sbostic  * Computer Consoles Inc.
7*45760Sbostic  *
8*45760Sbostic  * %sccs.include.redist.c%
9*45760Sbostic  *
10*45760Sbostic  *	@(#)Acvfl.c	7.1 (Berkeley) 12/06/90
11*45760Sbostic  */
1229599Ssam 
1345699Sbostic #include "align.h"
cvfl(infop)1429599Ssam cvfl(infop)	process_info *infop;
1529599Ssam /*
1629599Ssam /*	Convert single precission accumulator into integer.
1729599Ssam /*
1829599Ssam /******************************************************/
1929599Ssam {
2029599Ssam 	register	long	Register_12;	/* Has to be first reg ! */
2129599Ssam 	register	float	*acc_pnt;
2229599Ssam 	register	long	result;
2329599Ssam 
2429599Ssam 	acc_pnt = (float *)&acc_high;
2529599Ssam 	Register_12=psl;
2629599Ssam 	Set_psl(r12);	/* restore the user psl */
2729599Ssam 	result = (long) *acc_pnt;
2829599Ssam 	asm ("	movpsl	r12");
2929599Ssam 	New_cc (Register_12);
3029599Ssam 	write_back (infop, result, operand(infop,0) );
3129599Ssam }
32