mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 13:43:28 +00:00
mips: implement __udivdi3
Squashfs wasn't compiling because the lldiv() directives turn into __udivdi3 and we are using private libgcc. After this squashfs compiles for MIPS. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Tested-by: Bartel Eerdekens <barteleerdekens@gmail.com>
This commit is contained in:
parent
f3c979dd00
commit
811dd44b0b
2 changed files with 18 additions and 1 deletions
|
@ -14,4 +14,4 @@ obj-$(CONFIG_CMD_BOOTM) += bootm.o
|
|||
obj-$(CONFIG_CMD_GO) += boot.o
|
||||
obj-$(CONFIG_SPL_BUILD) += spl.o
|
||||
|
||||
lib-$(CONFIG_USE_PRIVATE_LIBGCC) += ashldi3.o ashrdi3.o lshrdi3.o
|
||||
lib-$(CONFIG_USE_PRIVATE_LIBGCC) += ashldi3.o ashrdi3.o lshrdi3.o udivdi3.o
|
||||
|
|
17
arch/mips/lib/udivdi3.c
Normal file
17
arch/mips/lib/udivdi3.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
|
||||
#include "libgcc.h"
|
||||
|
||||
#if BITS_PER_LONG == 32
|
||||
|
||||
#include <div64.h>
|
||||
|
||||
long long __udivdi3(long long u, word_type b)
|
||||
{
|
||||
long long ret = u;
|
||||
|
||||
__div64_32(&ret, b);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* BITS_PER_LONG == 32 */
|
Loading…
Reference in a new issue