* [PATCH] LoongArch: Select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
@ 2024-03-27 17:17 Xi Ruoyao
2024-03-29 2:09 ` Huacai Chen
2024-04-26 4:00 ` Huacai Chen
0 siblings, 2 replies; 4+ messages in thread
From: Xi Ruoyao @ 2024-03-27 17:17 UTC (permalink / raw)
To: Huacai Chen, WANG Xuerui; +Cc: loongarch, linux-kernel, Tiezhu Yang, Xi Ruoyao
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.
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
---
arch/loongarch/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
index a5f300ec6f28..5a769bb92d7c 100644
--- a/arch/loongarch/Kconfig
+++ b/arch/loongarch/Kconfig
@@ -56,6 +56,7 @@ config LOONGARCH
select ARCH_SUPPORTS_ACPI
select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_SUPPORTS_HUGETLBFS
+ select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
select ARCH_SUPPORTS_LTO_CLANG
select ARCH_SUPPORTS_LTO_CLANG_THIN
select ARCH_SUPPORTS_NUMA_BALANCING
--
2.44.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] LoongArch: Select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
2024-03-27 17:17 [PATCH] LoongArch: Select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 Xi Ruoyao
@ 2024-03-29 2:09 ` Huacai Chen
2024-04-26 4:00 ` Huacai Chen
1 sibling, 0 replies; 4+ messages in thread
From: Huacai Chen @ 2024-03-29 2:09 UTC (permalink / raw)
To: Xi Ruoyao; +Cc: WANG Xuerui, loongarch, linux-kernel, Tiezhu Yang
Queued for loongarch-next, thanks.
Huacai
On Thu, Mar 28, 2024 at 1:18 AM Xi Ruoyao <xry111@xry111.site> wrote:
>
> 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.
>
> Signed-off-by: Xi Ruoyao <xry111@xry111.site>
> ---
> arch/loongarch/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
> index a5f300ec6f28..5a769bb92d7c 100644
> --- a/arch/loongarch/Kconfig
> +++ b/arch/loongarch/Kconfig
> @@ -56,6 +56,7 @@ config LOONGARCH
> select ARCH_SUPPORTS_ACPI
> select ARCH_SUPPORTS_ATOMIC_RMW
> select ARCH_SUPPORTS_HUGETLBFS
> + select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
> select ARCH_SUPPORTS_LTO_CLANG
> select ARCH_SUPPORTS_LTO_CLANG_THIN
> select ARCH_SUPPORTS_NUMA_BALANCING
> --
> 2.44.0
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] LoongArch: Select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
2024-03-27 17:17 [PATCH] LoongArch: Select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 Xi Ruoyao
2024-03-29 2:09 ` Huacai Chen
@ 2024-04-26 4:00 ` Huacai Chen
2024-04-26 5:53 ` Xi Ruoyao
1 sibling, 1 reply; 4+ messages in thread
From: Huacai Chen @ 2024-04-26 4:00 UTC (permalink / raw)
To: Xi Ruoyao; +Cc: WANG Xuerui, loongarch, linux-kernel, Tiezhu Yang
Hi, Ruoyao,
If enable CONFIG_DEBUG_INFO_BTF, we get:
loongarch64-unknown-linux-gnu-ld: kernel/sched/fair.o: in function
`mul_u64_u32_shr':
/home/chenhuacai/linux-test.git/./include/linux/math64.h:161:(.text+0x5e4):
undefined reference to `__lshrti3'
So, could you please implement _ashlti3(), __ashrti3(), and
__lshrti3() as commit fbac266f095de92b93e7 ("s390: select
ARCH_SUPPORTS_INT128") does?
Huacai
On Thu, Mar 28, 2024 at 1:18 AM Xi Ruoyao <xry111@xry111.site> wrote:
>
> 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.
>
> Signed-off-by: Xi Ruoyao <xry111@xry111.site>
> ---
> arch/loongarch/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
> index a5f300ec6f28..5a769bb92d7c 100644
> --- a/arch/loongarch/Kconfig
> +++ b/arch/loongarch/Kconfig
> @@ -56,6 +56,7 @@ config LOONGARCH
> select ARCH_SUPPORTS_ACPI
> select ARCH_SUPPORTS_ATOMIC_RMW
> select ARCH_SUPPORTS_HUGETLBFS
> + select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
> select ARCH_SUPPORTS_LTO_CLANG
> select ARCH_SUPPORTS_LTO_CLANG_THIN
> select ARCH_SUPPORTS_NUMA_BALANCING
> --
> 2.44.0
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] LoongArch: Select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
2024-04-26 4:00 ` Huacai Chen
@ 2024-04-26 5:53 ` Xi Ruoyao
0 siblings, 0 replies; 4+ messages in thread
From: Xi Ruoyao @ 2024-04-26 5:53 UTC (permalink / raw)
To: Huacai Chen; +Cc: WANG Xuerui, loongarch, linux-kernel, Tiezhu Yang
On Fri, 2024-04-26 at 12:00 +0800, Huacai Chen wrote:
> Hi, Ruoyao,
>
> If enable CONFIG_DEBUG_INFO_BTF, we get:
>
> loongarch64-unknown-linux-gnu-ld: kernel/sched/fair.o: in function
> `mul_u64_u32_shr':
> /home/chenhuacai/linux-test.git/./include/linux/math64.h:161:(.text+0x5e4):
> undefined reference to `__lshrti3'
>
> So, could you please implement _ashlti3(), __ashrti3(), and
> __lshrti3() as commit fbac266f095de92b93e7 ("s390: select
> ARCH_SUPPORTS_INT128") does?
It seems not related to DEBUG_INFO_BTF, but related to
CC_OPTIMIZE_FOR_SIZE.
I'm making a patch.
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-04-26 6:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-27 17:17 [PATCH] LoongArch: Select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 Xi Ruoyao
2024-03-29 2:09 ` Huacai Chen
2024-04-26 4:00 ` Huacai Chen
2024-04-26 5:53 ` Xi Ruoyao
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.