minix/sys/external/bsd/compiler_rt/dist/lib/arm/aeabi_uidivmod.S
Lionel Sambuc 4684ddb6aa LLVM Minix changes
- import libcxx
 - reduce targets to the one when compiled as a tools

Change-Id: Iabb8427f80ff8e89463559a28bcb8b4f2bdbc496
2014-07-28 17:05:59 +02:00

29 lines
883 B
ArmAsm

//===-- aeabi_uidivmod.S - EABI uidivmod 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 { unsigned quot, unsigned rem}
// __aeabi_uidivmod(unsigned numerator, unsigned denominator) {
// unsigned rem, quot;
// quot = __udivmodsi4(numerator, denominator, &rem);
// return {quot, rem};
// }
.syntax unified
.align 2
DEFINE_COMPILERRT_FUNCTION(__aeabi_uidivmod)
push { lr }
sub sp, sp, #4
mov r2, sp
bl SYMBOL_NAME(__udivmodsi4)
ldr r1, [sp]
add sp, sp, #4
pop { pc }