xref: /csrg-svn/sys/tahoe/align/Asub3.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  *	@(#)Asub3.c	7.1 (Berkeley) 12/06/90
11*45760Sbostic  */
1229638Ssam 
1345699Sbostic #include "align.h"
sub3(infop)1429638Ssam sub3(infop)	process_info *infop;
1529638Ssam /*
1629638Ssam /*	Subtract , 3 operands.
1729638Ssam /*
1829638Ssam /*****************************************/
1929638Ssam {
2029638Ssam 
2129638Ssam 	register	long	Register_12;	/* Has to be first reg ! */
2229638Ssam 	register 	long	data0, data1, result;
2329638Ssam 
2429638Ssam 	data0 = operand(infop,0)->data;
2529638Ssam 	data1 = operand(infop,1)->data;
2629638Ssam 	Register_12=psl;
2729638Ssam 	Set_psl(r12);	/* restore the user psl */
2829638Ssam 	result = data1 - data0;		/* 32 bits of true result */
2929638Ssam 	asm ("	movpsl	r12");
3029638Ssam 	New_cc (Register_12);
3129638Ssam 	write_back (infop,result, operand(infop,2) );
3229638Ssam }
33