1238901Sandrew//===-- aeabi_ldivmod.S - EABI ldivmod implementation ---------------------===// 2238901Sandrew// 3238901Sandrew// The LLVM Compiler Infrastructure 4238901Sandrew// 5238901Sandrew// This file is dual licensed under the MIT and the University of Illinois Open 6238901Sandrew// Source Licenses. See LICENSE.TXT for details. 7238901Sandrew// 8238901Sandrew//===----------------------------------------------------------------------===// 9238901Sandrew 10238901Sandrew#include "../assembly.h" 11238901Sandrew 12238901Sandrew// struct { int64_t quot, int64_t rem} 13238901Sandrew// __aeabi_ldivmod(int64_t numerator, int64_t denominator) { 14238901Sandrew// int64_t rem, quot; 15238901Sandrew// quot = __divmoddi4(numerator, denominator, &rem); 16238901Sandrew// return {quot, rem}; 17238901Sandrew// } 18238901Sandrew 19238901Sandrew .syntax unified 20238901Sandrew .align 2 21238901SandrewDEFINE_COMPILERRT_FUNCTION(__aeabi_ldivmod) 22238901Sandrew push {r11, lr} 23238901Sandrew sub sp, sp, #16 24238901Sandrew add r12, sp, #8 25238901Sandrew str r12, [sp] 26238901Sandrew bl SYMBOL_NAME(__divmoddi4) 27238901Sandrew ldr r2, [sp, #8] 28238901Sandrew ldr r3, [sp, #12] 29238901Sandrew add sp, sp, #16 30238901Sandrew pop {r11, pc} 31