1*8a6a9560SDaniel Boulby //===-- divdi3.c - Implement __divdi3 -------------------------------------===// 2*8a6a9560SDaniel Boulby // 3*8a6a9560SDaniel Boulby // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*8a6a9560SDaniel Boulby // See https://llvm.org/LICENSE.txt for license information. 5*8a6a9560SDaniel Boulby // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*8a6a9560SDaniel Boulby // 7*8a6a9560SDaniel Boulby //===----------------------------------------------------------------------===// 8*8a6a9560SDaniel Boulby // 9*8a6a9560SDaniel Boulby // This file implements __divdi3 for the compiler_rt library. 10*8a6a9560SDaniel Boulby // 11*8a6a9560SDaniel Boulby //===----------------------------------------------------------------------===// 128c80c865SLionel Debieve 138c80c865SLionel Debieve #include "int_lib.h" 148c80c865SLionel Debieve 15*8a6a9560SDaniel Boulby // Returns: a / b 168c80c865SLionel Debieve 17*8a6a9560SDaniel Boulby #define fixint_t di_int 18*8a6a9560SDaniel Boulby #define fixuint_t du_int 19*8a6a9560SDaniel Boulby #define COMPUTE_UDIV(a, b) __udivmoddi4((a), (b), (du_int *)0) 20*8a6a9560SDaniel Boulby #include "int_div_impl.inc" 21*8a6a9560SDaniel Boulby __divdi3(di_int a,di_int b)22*8a6a9560SDaniel BoulbyCOMPILER_RT_ABI di_int __divdi3(di_int a, di_int b) { return __divXi3(a, b); } 23