. ldivmod, uldivmod were passing the modulo argument pointer
in R4, which is bogus, as qdivrem expects it on the stack as
per the EABI, causing essentially 'random' memory to be trampled
by qdivrem. fix by pushing R4 before the call.
. also add these functions to -minc so -lminc clients can be
linked without -lgcc
Change-Id: I90b0b28b51a188c93da5de6afb108224749ea794
*/
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? */
/*
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.
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