Date: Sun, 5 Feb 2012 07:19:01 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r231008 - in projects/arm_eabi: contrib/compiler-rt/lib contrib/compiler-rt/lib/arm lib/libcompiler_rt Message-ID: <201202050719.q157J1kl071635@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Sun Feb 5 07:19:00 2012 New Revision: 231008 URL: http://svn.freebsd.org/changeset/base/231008 Log: Bring in the __aeabi_*divmod functions from compiler-rt r149242 Added: projects/arm_eabi/contrib/compiler-rt/lib/arm/aeabi_idivmod.S projects/arm_eabi/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S projects/arm_eabi/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S projects/arm_eabi/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S Modified: projects/arm_eabi/contrib/compiler-rt/lib/divmoddi4.c projects/arm_eabi/contrib/compiler-rt/lib/udivmoddi4.c projects/arm_eabi/lib/libcompiler_rt/Makefile Added: projects/arm_eabi/contrib/compiler-rt/lib/arm/aeabi_idivmod.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/arm_eabi/contrib/compiler-rt/lib/arm/aeabi_idivmod.S Sun Feb 5 07:19:00 2012 (r231008) @@ -0,0 +1,27 @@ +//===-- aeabi_idivmod.S - EABI idivmod 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 { int quot, int rem} __aeabi_idivmod(int numerator, int denominator) { +// int rem, quot; +// quot = __divmodsi4(numerator, denominator, &rem); +// return {quot, rem}; +// } + + .syntax unified + .align 2 +DEFINE_COMPILERRT_FUNCTION(__aeabi_idivmod) + push { lr } + sub sp, sp, #4 + mov r2, sp + bl SYMBOL_NAME(__divmodsi4) + ldr r1, [sp] + add sp, sp, #4 + pop { pc } Added: projects/arm_eabi/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/arm_eabi/contrib/compiler-rt/lib/arm/aeabi_ldivmod.S Sun Feb 5 07:19:00 2012 (r231008) @@ -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} Added: projects/arm_eabi/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/arm_eabi/contrib/compiler-rt/lib/arm/aeabi_uidivmod.S Sun Feb 5 07:19:00 2012 (r231008) @@ -0,0 +1,28 @@ +//===-- 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 } Added: projects/arm_eabi/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/arm_eabi/contrib/compiler-rt/lib/arm/aeabi_uldivmod.S Sun Feb 5 07:19:00 2012 (r231008) @@ -0,0 +1,30 @@ +//===-- aeabi_uldivmod.S - EABI uldivmod 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 { uint64_t quot, uint64_t rem} +// __aeabi_uldivmod(uint64_t numerator, uint64_t denominator) { +// uint64_t rem, quot; +// quot = __udivmoddi4(numerator, denominator, &rem); +// return {quot, rem}; +// } + + .syntax unified + .align 2 +DEFINE_COMPILERRT_FUNCTION(__aeabi_uldivmod) + push {r11, lr} + sub sp, sp, #16 + add r12, sp, #8 + str r12, [sp] + bl SYMBOL_NAME(__udivmoddi4) + ldr r2, [sp, #8] + ldr r3, [sp, #12] + add sp, sp, #16 + pop {r11, pc} Modified: projects/arm_eabi/contrib/compiler-rt/lib/divmoddi4.c ============================================================================== --- projects/arm_eabi/contrib/compiler-rt/lib/divmoddi4.c Sun Feb 5 07:11:02 2012 (r231007) +++ projects/arm_eabi/contrib/compiler-rt/lib/divmoddi4.c Sun Feb 5 07:19:00 2012 (r231008) @@ -17,8 +17,6 @@ extern COMPILER_RT_ABI di_int __divdi3(di_int a, di_int b); -ARM_EABI_FNALIAS(ldivmod, divmoddi4); - /* Returns: a / b, *rem = a % b */ COMPILER_RT_ABI di_int Modified: projects/arm_eabi/contrib/compiler-rt/lib/udivmoddi4.c ============================================================================== --- projects/arm_eabi/contrib/compiler-rt/lib/udivmoddi4.c Sun Feb 5 07:11:02 2012 (r231007) +++ projects/arm_eabi/contrib/compiler-rt/lib/udivmoddi4.c Sun Feb 5 07:19:00 2012 (r231008) @@ -21,8 +21,6 @@ /* Translated from Figure 3-40 of The PowerPC Compiler Writer's Guide */ -ARM_EABI_FNALIAS(uldivmod, udivmoddi4); - COMPILER_RT_ABI du_int __udivmoddi4(du_int a, du_int b, du_int* rem) { Modified: projects/arm_eabi/lib/libcompiler_rt/Makefile ============================================================================== --- projects/arm_eabi/lib/libcompiler_rt/Makefile Sun Feb 5 07:11:02 2012 (r231007) +++ projects/arm_eabi/lib/libcompiler_rt/Makefile Sun Feb 5 07:19:00 2012 (r231008) @@ -152,6 +152,13 @@ SRCS+= ${file}.c . endif .endfor +.if ${MACHINE_CPUARCH} == "arm" +SRCS+= aeabi_idivmod.S \ + aeabi_ldivmod.S \ + aeabi_uidivmod.S \ + aeabi_uldivmod.S +.endif + .if ${MACHINE_CPUARCH} != "sparc64" && ${MACHINE_CPUARCH} != "mips" . if ${MK_INSTALLLIB} != "no" SYMLINKS+=libcompiler_rt.a ${LIBDIR}/libgcc.a
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202050719.q157J1kl071635>