xref: /llvm-project/compiler-rt/lib/builtins/udivti3.c (revision 0ba22f51d128bee9d69756c56c4678097270e10b)
1*0ba22f51SPetr Hosek //===-- udivti3.c - Implement __udivti3 -----------------------------------===//
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 __udivti3 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 
__udivti3(tu_int a,tu_int b)19082b89b2SPetr Hosek COMPILER_RT_ABI tu_int __udivti3(tu_int a, tu_int b) {
20a6b264b5SAlexey Samsonov   return __udivmodti4(a, b, 0);
21a6b264b5SAlexey Samsonov }
22a6b264b5SAlexey Samsonov 
23*0ba22f51SPetr Hosek #endif // CRT_HAS_128BIT
24