diff --git a/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S b/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S index 47de1650a..041ce8558 100644 --- a/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S +++ b/common/lib/libc/arch/arm/quad/__aeabi_ldivmod.S @@ -66,7 +66,9 @@ ENTRY(__aeabi_ldivmod) */ sub sp, sp, #8 mov r4, sp /* pointer to remainder */ + push {r4} bl PLT_SYM(__qdivrem) + add sp, sp, #4 /* forget pointer to remainder */ teq NEG, #0 /* any signs to flip? */ /* diff --git a/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S b/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S index bb352157f..12351d133 100644 --- a/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S +++ b/common/lib/libc/arch/arm/quad/__aeabi_uldivmod.S @@ -41,7 +41,9 @@ ENTRY(__aeabi_uldivmod) push {r4,lr} sub sp, sp, #8 mov r4, sp + push {r4} bl PLT_SYM(__qdivrem) + add sp, sp, #4 /* * The remainder is already on the stack just waiting to be popped * into r2/r3. diff --git a/lib/libminc/Makefile b/lib/libminc/Makefile index e9be11aae..442b848be 100644 --- a/lib/libminc/Makefile +++ b/lib/libminc/Makefile @@ -131,6 +131,10 @@ CPPFLAGS.strtol.c+= -I${LIBCSRCDIR}/../../common/lib/libc/stdlib SRCS+= ${i} .endfor +.if (${MACHINE_ARCH} == "earm") +SRCS += __aeabi_ldivmod.S __aeabi_uldivmod.S +.endif + # Import from locale .for i in _def_time.c .PATH.c: ${LIBCSRCDIR}/locale