Path: blob/main/contrib/llvm-project/compiler-rt/lib/builtins/arm/aeabi_ldivmod.S
35292 views
//===-- aeabi_ldivmod.S - EABI ldivmod implementation ---------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "../assembly.h"910// struct { int64_t quot, int64_t rem}11// __aeabi_ldivmod(int64_t numerator, int64_t denominator) {12// int64_t rem, quot;13// quot = __divmoddi4(numerator, denominator, &rem);14// return {quot, rem};15// }1617#if defined(__MINGW32__)18#define __aeabi_ldivmod __rt_sdiv6419#endif2021.syntax unified22.p2align 223DEFINE_COMPILERRT_FUNCTION(__aeabi_ldivmod)24push {r6, lr}25sub sp, sp, #1626add r6, sp, #827str r6, [sp]28#if defined(__MINGW32__)29movs r6, r030movs r0, r231movs r2, r632movs r6, r133movs r1, r334movs r3, r635#endif36bl SYMBOL_NAME(__divmoddi4)37ldr r2, [sp, #8]38ldr r3, [sp, #12]39add sp, sp, #1640pop {r6, pc}41END_COMPILERRT_FUNCTION(__aeabi_ldivmod)4243NO_EXEC_STACK_DIRECTIVE44454647