1 //===-- divmodsi4.c - Implement __divmodsi4
2 //--------------------------------===//
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===----------------------------------------------------------------------===//
10 // This file implements __divmodsi4 for the compiler_rt library.
12 //===----------------------------------------------------------------------===//
16 // Returns: a / b, *rem = a % b
18 COMPILER_RT_ABI si_int __divmodsi4(si_int a, si_int b, si_int *rem) {
19 si_int d = __divsi3(a, b);