- mips: implement __udivdi3 to fix building of SquashFS
- mips: fix bug in cache init on MIPS32r2 or later
This commit is contained in:
Tom Rini
2024-03-13 17:15:46 -04:00
3 changed files with 20 additions and 3 deletions
+1 -1
View File
@@ -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
+2 -2
View File
@@ -431,9 +431,9 @@ LEAF(change_k0_cca)
#else
xor a0, a0, t0
andi a0, a0, CONF_CM_CMASK
xor a0, a0, t0
xor t0, a0, t0
#endif
mtc0 a0, CP0_CONFIG
mtc0 t0, CP0_CONFIG
jr.hb ra
END(change_k0_cca)
+17
View 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 */