summaryrefslogtreecommitdiff
path: root/arch/loongarch
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2024-05-14 07:24:18 +0300
committerHuacai Chen <chenhuacai@loongson.cn>2024-05-14 07:24:18 +0300
commit2cce9059599143aa950b0baaf2523b17ab47d27d (patch)
tree3b52495b349413fe801eb0e3086f9dec3df0ba81 /arch/loongarch
parenta38297e3fb012ddfa7ce0321a7e5a8daeb1872b6 (diff)
downloadlinux-2cce9059599143aa950b0baaf2523b17ab47d27d.tar.xz
LoongArch: Select ARCH_HAS_FAST_MULTIPLIER
LA464 and LA664 can do 32-bit/64-bit integer multiplication with a latency of 4 cycles and a throughput of 2 ops per cycle. It is comparable to the mainstream x86 and arm64 cores, so we can select ARCH_HAS_FAST_MULTIPLIER like them. It speeds up __sw_hweight32() in lib/hweight.c for about 14% on LA464 and 11% on LA664, while __sw_hweight64() for about 30% on LA464 and 33% on LA664. Signed-off-by: Xi Ruoyao <xry111@xry111.site> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch')
-rw-r--r--arch/loongarch/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
index 54ad04dacdee..1355ec0c69cc 100644
--- a/arch/loongarch/Kconfig
+++ b/arch/loongarch/Kconfig
@@ -16,6 +16,7 @@ config LOONGARCH
select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
select ARCH_HAS_CPU_FINALIZE_INIT
select ARCH_HAS_CURRENT_STACK_POINTER
+ select ARCH_HAS_FAST_MULTIPLIER
select ARCH_HAS_FORTIFY_SOURCE
select ARCH_HAS_KCOV
select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS