1214152Sed/* ===-- umoddi3.c - Implement __umoddi3 -----------------------------------=== 2214152Sed * 3214152Sed * The LLVM Compiler Infrastructure 4214152Sed * 5222656Sed * This file is dual licensed under the MIT and the University of Illinois Open 6222656Sed * Source Licenses. See LICENSE.TXT for details. 7214152Sed * 8214152Sed * ===----------------------------------------------------------------------=== 9214152Sed * 10214152Sed * This file implements __umoddi3 for the compiler_rt library. 11214152Sed * 12214152Sed * ===----------------------------------------------------------------------=== 13214152Sed */ 14214152Sed 15214152Sed#include "int_lib.h" 16214152Sed 17222656Seddu_int COMPILER_RT_ABI __udivmoddi4(du_int a, du_int b, du_int* rem); 18214152Sed 19214152Sed/* Returns: a % b */ 20214152Sed 21222656SedCOMPILER_RT_ABI du_int 22214152Sed__umoddi3(du_int a, du_int b) 23214152Sed{ 24214152Sed du_int r; 25214152Sed __udivmoddi4(a, b, &r); 26214152Sed return r; 27214152Sed} 28