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