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

From: D. Jeff Dionne
Date: Fri Apr 21 2023 - 07:16:16 EST




> On Apr 21, 2023, at 20:03, John Paul Adrian Glaubitz <glaubitz@xxxxxxxxxxxxxxxxxxx> wrote:
>
> Hi Geert!
>
> 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.
...
>
> Why are the single-precision (denoted as "si") variants not being replaced?
>
> Don't we have generic versions for these?

The SH arch versions of si variants are optimized assembler, which is pretty important… these are things like bit shifts.

Actually, it would be better to have the di variants be hand coded asm also… I’m not sure how much use the kernel makes of those, and I’ve not looked if there is a good source of optimized SH versions those with the right license.

J.

>
> Adrian
>
> --
> .''`. John Paul Adrian Glaubitz
> : :' : Debian Developer
> `. `' Physicist
> `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913