1
linux/arch/loongarch/lib
Xi Ruoyao 5125d033c8 LoongArch: Select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
This allows compiling a full 128-bit product of two 64-bit integers as a
mul/mulh pair, instead of a nasty long sequence of 20+ instructions.

However, after selecting ARCH_SUPPORTS_INT128, when optimizing for size
the compiler generates calls to __ashlti3, __ashrti3, and __lshrti3 for
shifting __int128 values, causing a link failure:

    loongarch64-unknown-linux-gnu-ld: kernel/sched/fair.o: in
    function `mul_u64_u32_shr':
    <PATH>/include/linux/math64.h:161:(.text+0x5e4): undefined
    reference to `__lshrti3'

So provide the implementation of these functions if ARCH_SUPPORTS_INT128.

Closes: https://lore.kernel.org/loongarch/CAAhV-H5EZ=7OF7CSiYyZ8_+wWuenpo=K2WT8-6mAT4CvzUC_4g@mail.gmail.com/
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2024-05-14 12:24:18 +08:00
..
clear_user.S
copy_user.S
csum.c LoongArch: Add checksum optimization for 64-bit system 2023-05-01 17:19:43 +08:00
delay.c
dump_tlb.c
error-inject.c
Makefile LoongArch: Select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 2024-05-14 12:24:18 +08:00
memcpy.S
memmove.S
memset.S
tishift.S
unaligned.S
xor_simd_glue.c
xor_simd.c
xor_simd.h LoongArch: Add SIMD-optimized XOR routines 2023-09-06 22:53:55 +08:00
xor_template.c