//===-- udivmoddi4.c - Implement __udivmoddi4 -----------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file implements __udivmoddi4 for the compiler_rt library. // //===----------------------------------------------------------------------===// #include "int_lib.h" // Effects: if rem != 0, *rem = a % b // Returns: a / b // Translated from Figure 3-40 of The PowerPC Compiler Writer's Guide #if defined(_MSC_VER) && !defined(__clang__) // MSVC throws a warning about mod 0 here, disable it for builds that // warn-as-error #pragma warning(push) #pragma warning(disable : 4723 4724) #endif COMPILER_RT_ABI du_int __udivmoddi4(du_int a, du_int b, du_int *rem) { … } #if defined(_MSC_VER) && !defined(__clang__) #pragma warning(pop) #endif