div: Remove libgcc-compatible API.
* lib/mes/div.c (__aeabi_idiv): Delete procedure. (__aeabi_idivmod): Delete procedure. (__aeabi_uidivmod): Delete procedure. (__aeabi_uidiv): Delete procedure.
This commit is contained in:
parent
9db916bba1
commit
afac5847e7
|
@ -127,54 +127,3 @@ __mesabi_idiv (int a, int b)
|
|||
__mesabi_ldiv(a, b, &result);
|
||||
return result.quot;
|
||||
}
|
||||
|
||||
#if __GNUC__ && !SYSTEM_LIBC && __arm__
|
||||
// ...-binutils-2.31.1/bin/ld: hash.o: in function `hash_cstring':
|
||||
// hash.c:(.text+0x56): undefined reference to `__aeabi_idivmod'
|
||||
// ...-binutils-2.31.1/bin/ld: math.o: in function `divide':
|
||||
// math.c:(.text+0x516): undefined reference to `__aeabi_idiv'
|
||||
// ...-binutils-2.31.1/bin/ld: math.o: in function `modulo':
|
||||
// math.c:(.text+0x5d2): undefined reference to `__aeabi_idivmod'
|
||||
// ...-binutils-2.31.1/bin/ld: gcc-lib/libc.a(ntoab.o): in function `ntoab':
|
||||
// ntoab.c:(.text+0x54): undefined reference to `__aeabi_uidivmod'
|
||||
// ...-binutils-2.31.1/bin/ld: ntoab.c:(.text+0x62): undefined reference to `__aeabi_uidiv'
|
||||
|
||||
/* FIXME: This ABI should use registers for the input arguments, too.
|
||||
Maybe the others below, too. */
|
||||
long
|
||||
__aeabi_idiv (long a, long b)
|
||||
{
|
||||
ldiv_t result;
|
||||
__mesabi_ldiv(a, b, &result);
|
||||
return result.quot;
|
||||
}
|
||||
|
||||
/* Result: r0: quotient; r1: remainder */
|
||||
long
|
||||
__aeabi_idivmod (long a, long b)
|
||||
{
|
||||
ldiv_t result;
|
||||
__mesabi_ldiv(a, b, &result);
|
||||
register long rem_result asm("r1");
|
||||
rem_result = result.rem;
|
||||
return result.quot;
|
||||
}
|
||||
|
||||
/* Result: r0: quotient; r1: remainder */
|
||||
unsigned long
|
||||
__aeabi_uidivmod (unsigned long a, unsigned long b)
|
||||
{
|
||||
unsigned long quot;
|
||||
unsigned long rem;
|
||||
register unsigned long rem_result asm("r1");
|
||||
quot = __mesabi_uldiv (a, b, &rem);
|
||||
rem_result = rem;
|
||||
return quot;
|
||||
}
|
||||
|
||||
unsigned long
|
||||
__aeabi_uidiv (unsigned long a, unsigned long b)
|
||||
{
|
||||
return __mesabi_uldiv (a, b, 0);
|
||||
}
|
||||
#endif // __GNUC__ && !SYSTEM_LIBC && __arm__
|
||||
|
|
Loading…
Reference in a new issue