1 //===-- aeabi_uldivmod.S - EABI uldivmod implementation -------------------===//
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 #include "../assembly.h"
11 // struct { uint64_t quot, uint64_t rem}
12 // __aeabi_uldivmod(uint64_t numerator, uint64_t denominator) {
13 // uint64_t rem, quot;
14 // quot = __udivmoddi4(numerator, denominator, &rem);
15 // return {quot, rem};
18 #if defined(__MINGW32__)
19 #define __aeabi_uldivmod __rt_udiv64
24 DEFINE_COMPILERRT_FUNCTION(__aeabi_uldivmod)
29 #if defined(__MINGW32__)
37 bl SYMBOL_NAME(__udivmoddi4)
42 END_COMPILERRT_FUNCTION(__aeabi_uldivmod)
44 NO_EXEC_STACK_DIRECTIVE