1 //===-- divmoddi4.c - Implement __divmoddi4 -------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file implements __divmoddi4 for the compiler_rt library.
11 //===----------------------------------------------------------------------===//
15 // Returns: a / b, *rem = a % b
17 COMPILER_RT_ABI di_int __divmoddi4(di_int a, di_int b, di_int *rem) {
18 di_int d = __divdi3(a, b);