xref: /original-bsd/sys/tahoe/align/Axor2.c (revision b65ab6e5)
1*b65ab6e5Sbostic /*-
2*b65ab6e5Sbostic  * Copyright (c) 1986 The Regents of the University of California.
3*b65ab6e5Sbostic  * All rights reserved.
4*b65ab6e5Sbostic  *
5*b65ab6e5Sbostic  * This code is derived from software contributed to Berkeley by
6*b65ab6e5Sbostic  * Computer Consoles Inc.
7*b65ab6e5Sbostic  *
8*b65ab6e5Sbostic  * %sccs.include.redist.c%
9*b65ab6e5Sbostic  *
10*b65ab6e5Sbostic  *	@(#)Axor2.c	7.1 (Berkeley) 12/06/90
11*b65ab6e5Sbostic  */
12e8818cc2Ssam 
13f5878f6dSbostic #include "align.h"
xor2(infop)14e8818cc2Ssam xor2(infop) 	process_info *infop;
15e8818cc2Ssam /*
16e8818cc2Ssam /*	Xor , 2 operands.
17e8818cc2Ssam /*
18e8818cc2Ssam /****************************************/
19e8818cc2Ssam {
20e8818cc2Ssam 	register	long	Register_12;	/* Has to be first reg ! */
21e8818cc2Ssam 	register	long	result, data0, data1;
22e8818cc2Ssam 
23e8818cc2Ssam 	data0 = operand(infop,0)->data;
24e8818cc2Ssam 	data1 = operand(infop,1)->data;
25e8818cc2Ssam 	Register_12=psl;
26e8818cc2Ssam 	Set_psl(r12);	/* restore the user psl */
27e8818cc2Ssam 	result = data0 ^ data1;
28e8818cc2Ssam 	asm ("	movpsl	r12");
29e8818cc2Ssam 	New_cc (Register_12);
30e8818cc2Ssam 	write_back (infop,result, operand(infop,1) );
31e8818cc2Ssam }
32