xref: /csrg-svn/lib/libc/quad/xordi3.c (revision 54431)
153448Sbostic /*-
253448Sbostic  * Copyright (c) 1992 The Regents of the University of California.
353448Sbostic  * All rights reserved.
453448Sbostic  *
553794Sbostic  * This software was developed by the Computer Systems Engineering group
653794Sbostic  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
753794Sbostic  * contributed to Berkeley.
853794Sbostic  *
953448Sbostic  * %sccs.include.redist.c%
1053448Sbostic  */
1153448Sbostic 
1253448Sbostic #if defined(LIBC_SCCS) && !defined(lint)
13*54431Sbostic static char sccsid[] = "@(#)xordi3.c	5.4 (Berkeley) 06/25/92";
1453448Sbostic #endif /* LIBC_SCCS and not lint */
1553448Sbostic 
1653794Sbostic #include "quad.h"
1753459Sbostic 
1853794Sbostic /*
1953794Sbostic  * Return a ^ b, in quad.
2053794Sbostic  */
21*54431Sbostic quad_t
22*54431Sbostic __xordi3(a, b)
23*54431Sbostic 	quad_t a, b;
2453448Sbostic {
2553794Sbostic 	union uu aa, bb;
2653448Sbostic 
2753794Sbostic 	aa.q = a;
2853794Sbostic 	bb.q = b;
2953794Sbostic 	aa.ul[0] ^= bb.ul[0];
3053794Sbostic 	aa.ul[1] ^= bb.ul[1];
3153794Sbostic 	return (aa.q);
3253448Sbostic }
33