[PATCH] RFT: mips: implement __udivdi3

Linus Walleij linus.walleij at linaro.org
Thu Sep 21 22:45:13 CEST 2023


On Thu, Sep 21, 2023 at 3:42 PM Daniel Schwierzeck
<daniel.schwierzeck at gmail.com> wrote:

> I played around a bit and following simplified code compiles on various
> MIPS32 and MIPS64 boards. (E.g. "echo CONFIG_FS_SQUASHFS=y >>
> configs/malta[|64|el|64el]_defconfig && make malta[|64|el|64el]_defconfig")
>
>
>
> /* 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 */
>
> What do you think?

Looks good to me!

You can just modify the patch, sign off and apply,
I guess? Go ahead!

Yours,
Linus Walleij


More information about the U-Boot mailing list