175374Sbp/*-
275374Sbp * Copyright (c) 1992, 1993
375374Sbp *	The Regents of the University of California.  All rights reserved.
475374Sbp *
575374Sbp * This software was developed by the Computer Systems Engineering group
675374Sbp * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
775374Sbp * contributed to Berkeley.
875374Sbp *
975374Sbp * Redistribution and use in source and binary forms, with or without
1075374Sbp * modification, are permitted provided that the following conditions
1175374Sbp * are met:
1275374Sbp * 1. Redistributions of source code must retain the above copyright
1375374Sbp *    notice, this list of conditions and the following disclaimer.
1475374Sbp * 2. Redistributions in binary form must reproduce the above copyright
1575374Sbp *    notice, this list of conditions and the following disclaimer in the
1675374Sbp *    documentation and/or other materials provided with the distribution.
1775374Sbp * 4. Neither the name of the University nor the names of its contributors
1875374Sbp *    may be used to endorse or promote products derived from this software
1975374Sbp *    without specific prior written permission.
2075374Sbp *
2175374Sbp * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2275374Sbp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2375374Sbp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2475374Sbp * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2575374Sbp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2675374Sbp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2775374Sbp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2875374Sbp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2975374Sbp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3075374Sbp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3175374Sbp * SUCH DAMAGE.
3275374Sbp */
3375374Sbp
3475374Sbp#if defined(LIBC_SCCS) && !defined(lint)
3575374Sbpstatic char sccsid[] = "@(#)umoddi3.c	8.1 (Berkeley) 6/4/93";
3675374Sbp#endif /* LIBC_SCCS and not lint */
3775374Sbp#include <sys/cdefs.h>
3875374Sbp__FBSDID("$FreeBSD: releng/11.0/lib/libc/quad/umoddi3.c 165903 2007-01-09 00:28:16Z imp $");
3975374Sbp
4075374Sbp#include "quad.h"
4175374Sbp
4275374Sbp/*
4375374Sbp * Return remainder after dividing two unsigned quads.
4475374Sbp */
4575374Sbpu_quad_t
4675374Sbp__umoddi3(a, b)
4775374Sbp	u_quad_t a, b;
4875374Sbp{
4975374Sbp	u_quad_t r;
5075374Sbp
5175374Sbp	(void)__qdivrem(a, b, &r);
5275374Sbp	return (r);
5375374Sbp}
5475374Sbp