Re: [PATCH v3] sh: Use generic GCC library routines

Geert Uytterhoeven <[email protected]>
Newsgroups gmane.linux.kbuild.devel,gmane.linux.ports.sh.devel,gmane.linux.kernel
Message-ID <CAMuHMdW72T=OU0iEtbAjHqYUv_k0+xe8NeUod4BhzNTUqoPH6A@mail.gmail.com>
Hi Adrian,

On Fri, Apr 21, 2023 at 1:03 PM John Paul Adrian Glaubitz
<[email protected]> wrote:
> On Thu, 2023-03-23 at 11:18 +0100, Geert Uytterhoeven wrote:
> > The C implementations of __ashldi3(), __ashrdi3__(), and __lshrdi3() in
> > arch/sh/lib/ are identical to the generic C implementations in lib/.
> > Reduce duplication by switching SH to the generic versions.
> >
> > Update the include path in arch/sh/boot/compressed accordingly.
> >
> > Signed-off-by: Geert Uytterhoeven <[email protected]>
> > Acked-by: Palmer Dabbelt <[email protected]>

> > --- a/arch/sh/lib/Makefile
> > +++ b/arch/sh/lib/Makefile
> > @@ -7,9 +7,7 @@ lib-y  = delay.o memmove.o memchr.o \
> >        checksum.o strlen.o div64.o div64-generic.o
> >
> >  # Extracted from libgcc
> > -obj-y += movmem.o ashldi3.o ashrdi3.o lshrdi3.o \
> > -      ashlsi3.o ashrsi3.o ashiftrt.o lshrsi3.o \
> > -      udiv_qrnnd.o
> > +obj-y += movmem.o ashlsi3.o ashrsi3.o ashiftrt.o lshrsi3.o udiv_qrnnd.o
>
> Why are the single-precision (denoted as "si") variants not being replaced?
>
> Don't we have generic versions for these?

Because they are written in assembler, and thus different from generic
versions, and because Linux does not include generic versions for these.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.