1*0ba22f51SPetr Hosek //===-- umodti3.c - Implement __umodti3 -----------------------------------===// 2*0ba22f51SPetr Hosek // 3*0ba22f51SPetr Hosek // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*0ba22f51SPetr Hosek // See https://llvm.org/LICENSE.txt for license information. 5*0ba22f51SPetr Hosek // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*0ba22f51SPetr Hosek // 7*0ba22f51SPetr Hosek //===----------------------------------------------------------------------===// 8*0ba22f51SPetr Hosek // 9*0ba22f51SPetr Hosek // This file implements __umodti3 for the compiler_rt library. 10*0ba22f51SPetr Hosek // 11*0ba22f51SPetr Hosek //===----------------------------------------------------------------------===// 12a6b264b5SAlexey Samsonov 13a6b264b5SAlexey Samsonov #include "int_lib.h" 14a6b264b5SAlexey Samsonov 15938b0df7SJoerg Sonnenberger #ifdef CRT_HAS_128BIT 16a6b264b5SAlexey Samsonov 17*0ba22f51SPetr Hosek // Returns: a % b 18a6b264b5SAlexey Samsonov __umodti3(tu_int a,tu_int b)19082b89b2SPetr HosekCOMPILER_RT_ABI tu_int __umodti3(tu_int a, tu_int b) { 20a6b264b5SAlexey Samsonov tu_int r; 21a6b264b5SAlexey Samsonov __udivmodti4(a, b, &r); 22a6b264b5SAlexey Samsonov return r; 23a6b264b5SAlexey Samsonov } 24a6b264b5SAlexey Samsonov 25*0ba22f51SPetr Hosek #endif // CRT_HAS_128BIT 26