xref: /csrg-svn/sys/tahoe/align/Acmpd.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  *	@(#)Acmpd.c	7.1 (Berkeley) 12/06/90
11*45760Sbostic  */
1229596Ssam 
1345699Sbostic #include "align.h"
cmpd(infop)1429596Ssam cmpd(infop)	process_info *infop;
1529596Ssam /*
1629596Ssam /*	Compare accumulator (double) with operand.
1729596Ssam /*
1829596Ssam /****************************************************/
1929596Ssam {
2029596Ssam 	register float	*Register_12;	/* Has to be first reg ! */
2129596Ssam 	register float	*Register_11;
2229596Ssam 	register long	Register_10;
2329596Ssam 
2429596Ssam 	Register_12 = (float *) &acc_high;
2529596Ssam 	Register_11 = (float *) &operand(infop,0)->data;
2629596Ssam 	if ( reserved( *(long *)Register_11 ) )
2729596Ssam 			exception(infop, ILL_OPRND);
2829596Ssam 	asm ("	ldd	(r12)");
2929596Ssam 	Register_10=psl;
3029596Ssam 	Set_psl(r10);	/* restore the user psl */
3129596Ssam 	asm ("	cmpd	(r11)");
3229596Ssam 	asm ("	movpsl	r10");
3329596Ssam 	New_cc (Register_10);
3429596Ssam }
35