xref: /csrg-svn/sys/tahoe/align/Acvdl.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  *	@(#)Acvdl.c	7.1 (Berkeley) 12/06/90
11*45760Sbostic  */
1229598Ssam 
1345699Sbostic #include "align.h"
cvdl(infop)1429598Ssam cvdl(infop)	process_info *infop;
1529598Ssam /*
1629598Ssam /*	Convert double precission accumulator into integer.
1729598Ssam /*
1829598Ssam /******************************************************/
1929598Ssam {
2029598Ssam 	register	long	Register_12;	/* Has to be first reg ! */
2129598Ssam 	register	double	*acc_pnt;
2229598Ssam 	register	long	result;
2329598Ssam 
2429598Ssam 	acc_pnt = (double *)&acc_high;
2529598Ssam 	Register_12=psl;
2629598Ssam 	Set_psl(r12);	/* restore the user psl */
2729598Ssam 	result = (long) *acc_pnt;
2829598Ssam 	asm ("	movpsl	r12");
2929598Ssam 	New_cc (Register_12);
3029598Ssam 	write_back (infop, result, operand(infop,0) );
3129598Ssam }
32