umoddi3.c revision 276789
11573Srgrimes/* ===-- umoddi3.c - Implement __umoddi3 -----------------------------------=== 21573Srgrimes * 31573Srgrimes * The LLVM Compiler Infrastructure 41573Srgrimes * 51573Srgrimes * This file is dual licensed under the MIT and the University of Illinois Open 61573Srgrimes * Source Licenses. See LICENSE.TXT for details. 71573Srgrimes * 81573Srgrimes * ===----------------------------------------------------------------------=== 91573Srgrimes * 101573Srgrimes * This file implements __umoddi3 for the compiler_rt library. 111573Srgrimes * 121573Srgrimes * ===----------------------------------------------------------------------=== 131573Srgrimes */ 141573Srgrimes 151573Srgrimes#include "int_lib.h" 161573Srgrimes 171573Srgrimes/* Returns: a % b */ 181573Srgrimes 191573SrgrimesCOMPILER_RT_ABI du_int 201573Srgrimes__umoddi3(du_int a, du_int b) 211573Srgrimes{ 221573Srgrimes du_int r; 231573Srgrimes __udivmoddi4(a, b, &r); 241573Srgrimes return r; 251573Srgrimes} 261573Srgrimes