10b57cec5SDimitry Andric //===-- divti3.c - Implement __divti3 -------------------------------------===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric // 90b57cec5SDimitry Andric // This file implements __divti3 for the compiler_rt library. 100b57cec5SDimitry Andric // 110b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 120b57cec5SDimitry Andric 130b57cec5SDimitry Andric #include "int_lib.h" 140b57cec5SDimitry Andric 150b57cec5SDimitry Andric #ifdef CRT_HAS_128BIT 160b57cec5SDimitry Andric 170b57cec5SDimitry Andric // Returns: a / b 180b57cec5SDimitry Andric 19*e8d8bef9SDimitry Andric #define fixint_t ti_int 20*e8d8bef9SDimitry Andric #define fixuint_t tu_int 21*e8d8bef9SDimitry Andric #define COMPUTE_UDIV(a, b) __udivmodti4((a), (b), (tu_int *)0) 22*e8d8bef9SDimitry Andric #include "int_div_impl.inc" 23*e8d8bef9SDimitry Andric __divti3(ti_int a,ti_int b)24*e8d8bef9SDimitry AndricCOMPILER_RT_ABI ti_int __divti3(ti_int a, ti_int b) { return __divXi3(a, b); } 250b57cec5SDimitry Andric 260b57cec5SDimitry Andric #endif // CRT_HAS_128BIT 27