xref: /csrg-svn/sys/tahoe/align/Acmpf.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  *	@(#)Acmpf.c	7.1 (Berkeley) 12/06/90
11*45760Sbostic  */
1229597Ssam 
1345699Sbostic #include "align.h"
cmpf(infop)1429597Ssam cmpf(infop)	process_info *infop;
1529597Ssam /*
1629597Ssam /*	Compare accumulator (float) with operand.
1729597Ssam /*
1829597Ssam /*************************************************/
1929597Ssam {
2029597Ssam 	register float	*Register_12;	/* Has to be first reg ! */
2129597Ssam 	register float	*Register_11;
2229597Ssam 	register long	Register_10;
2329597Ssam 
2429597Ssam 	Register_12 = (float *) &acc_high;
2529597Ssam 	Register_11 = (float *) &operand(infop,0)->data;
2629597Ssam 	if ( reserved( *(long *)Register_11 ) )
2729597Ssam 			exception(infop, ILL_OPRND);
2829597Ssam 	asm ("	ldf	(r12)");
2929597Ssam 	Register_10=psl;
3029597Ssam 	Set_psl(r10);	/* restore the user psl */
3129597Ssam 	asm ("	cmpf	(r11)");
3229597Ssam 	asm ("	movpsl	r10");
3329597Ssam 	New_cc (Register_10);
3429597Ssam }
35