1 /*- 2 * Copyright (c) 1992 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This software was developed by the Computer Systems Engineering group 6 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and 7 * contributed to Berkeley. 8 * 9 * %sccs.include.redist.c% 10 */ 11 12 #if defined(LIBC_SCCS) && !defined(lint) 13 static char sccsid[] = "@(#)ucmpdi2.c 5.4 (Berkeley) 06/02/92"; 14 #endif /* LIBC_SCCS and not lint */ 15 16 #include "quad.h" 17 18 /* 19 * Return 0, 1, or 2 as a <, =, > b respectively. 20 * Neither a nor b are considered signed. 21 */ 22 int 23 __ucmpdi2(u_quad a, u_quad b) 24 { 25 union uu aa, bb; 26 27 aa.uq = a; 28 bb.uq = b; 29 return (aa.ul[H] < bb.ul[H] ? 0 : aa.ul[H] > bb.ul[H] ? 2 : 30 aa.ul[L] < bb.ul[L] ? 0 : aa.ul[L] > bb.ul[L] ? 2 : 1); 31 } 32