• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//===-- aeabi_ldivmod.S - EABI ldivmod implementation ---------------------===//
2//
3//	             The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10// 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// }
16
17	.syntax	unified
18	.text
19	.align	2
20	.global	__aeabi_ldivmod
21	.thumb
22	.thumb_func
23	.type	__aeabi_ldivmod, %function
24__aeabi_ldivmod:
25	push	{lr}
26	sub	sp, sp, #16
27	add	r12, sp, #8
28	str	r12, [sp]
29	bl	__divmoddi4
30	ldr	r2, [sp, #8]
31	ldr	r3, [sp, #12]
32	add	sp, sp, #16
33	pop	{pc}
34	.size __aeabi_ldivmod, .-__aeabi_ldivmod
35