diff options
author | andrew <andrew@FreeBSD.org> | 2012-07-30 10:58:13 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2012-07-30 10:58:13 +0000 |
commit | cfeab007a554034f0b3ab4a677cf9dd2696c12f9 (patch) | |
tree | 40cc44a3d02ed86de24f2117a55680e4f0eb01a0 /lib/arm/aeabi_ldivmod.S | |
parent | 07af089f1449ec5506ca7ede5b593e11a0f48603 (diff) | |
download | FreeBSD-src-cfeab007a554034f0b3ab4a677cf9dd2696c12f9.zip FreeBSD-src-cfeab007a554034f0b3ab4a677cf9dd2696c12f9.tar.gz |
Import compiler-rt r160957.
Diffstat (limited to 'lib/arm/aeabi_ldivmod.S')
-rw-r--r-- | lib/arm/aeabi_ldivmod.S | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/arm/aeabi_ldivmod.S b/lib/arm/aeabi_ldivmod.S new file mode 100644 index 0000000..197c459 --- /dev/null +++ b/lib/arm/aeabi_ldivmod.S @@ -0,0 +1,30 @@ +//===-- aeabi_ldivmod.S - EABI ldivmod implementation ---------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "../assembly.h" + +// struct { int64_t quot, int64_t rem} +// __aeabi_ldivmod(int64_t numerator, int64_t denominator) { +// int64_t rem, quot; +// quot = __divmoddi4(numerator, denominator, &rem); +// return {quot, rem}; +// } + + .syntax unified + .align 2 +DEFINE_COMPILERRT_FUNCTION(__aeabi_ldivmod) + push {r11, lr} + sub sp, sp, #16 + add r12, sp, #8 + str r12, [sp] + bl SYMBOL_NAME(__divmoddi4) + ldr r2, [sp, #8] + ldr r3, [sp, #12] + add sp, sp, #16 + pop {r11, pc} |